Set the file handle from the _path value
348484
private void setFileHandle() {
        byte[] fileHandle = null;
        if (_isRootFile) {
            fileHandle = getNfs().getRootFileHandle();
        } else {
            try {
                if (getParentFile().getFileHandle() != null) {
                    fileHandle = getNfs().wrapped_getLookup(makeLookupRequest()).getFileHandle();
                }
            } catch (IOException e) {
                // do nothing, this will be a common exception
            }
        }
        setFileHandle(fileHandle);
    }
48846
def _set_filename(self, fn):
        """"""
        try:
            self.filename = self.fs = self.fn = os.path.abspath(fn.name)
        except AttributeError:
            self.filename = self.fs = self.fn = os.path.abspath(fn)
276071
def path(self, value):
        

        if value is not None:
            assert type(value) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format(
                "path", value)
            assert os.path.exists(value), "'{0}' attribute: '{1}' file doesn't exists!".format("path", value)
        self.__path = value
828256
function set_path($config_path)
	{
		if (!empty($config_path)) {
			if (!is_string($config_path) || !file_exists($config_path) || !is_dir($config_path)) {
				$this->_trigger_error_msg("Bad config file path '$config_path'");
				return;
			}
			if(substr($config_path, -1) != DIRECTORY_SEPARATOR) {
				$config_path .= DIRECTORY_SEPARATOR;
			}

			$this->_config_path = $config_path;
		}
	}
14540
def open(self, path, filename=None):
        
        scheme, key = self.getkey(path, filename=filename)
        return BotoReadFileHandle(scheme, key)
776756
def setattr_path(obj, path, value):
    
    path = path.split('__')
    o = obj
    for name in path[:-1]:
        o = getattr(o, name)
    setattr(o, path[-1], value)
    return obj
1085813
function handlePathSlashes (path) {
                var cutIndex = 0;
                for (var i = 0; i < path.length - 1; i++) {
                    if (path[i] === DIR_SEPARATOR && path[i + 1] === DIR_SEPARATOR) {
                        cutIndex = i + 1;
                    } else break;
                }

                return path.substr(cutIndex);
            }
1305923
def set_path(self, file_path):
        
        if not file_path:
            self.read_data = self.memory_read
            self.write_data = self.memory_write
        elif not is_valid(file_path):
            self.write_data(file_path, {})

        self.path = file_path
662488
def _resolve_file(file_name):
    
    if not file_name:
        return None

    path = os.path.realpath(file_name)
    if os.path.isfile(path):
        return path

    return None
73316
def do_put(self, from_path, to_path):
        
        from_file = open(os.path.expanduser(from_path), "rb")

        self.n.put(self.current_path + "/" + from_path, to_path)
1162875
def set_path(self, path, val):
        
        path = tuple(path.split('.')) if isinstance(path , str) else tuple(path)

        disallowed = [p for p in path if not type(self)._sanitizer.allowable(p)]
        if any(disallowed):
            raise Exception("Attribute strings in path elements cannot be "
                            "correctly escaped : %s" % ','.join(repr(el) for el in disallowed))
        if len(path) > 1:
            attrtree = self.__getattr__(path[0])
            attrtree.set_path(path[1:], val)
        else:
            self.__setattr__(path[0], val)
975219
def get_file_handle(file_path):
    
    LOG.debug("Check if file end is correct")

    if not os.path.exists(file_path):
        raise IOError("No such file:{0}".format(file_path))

    if not os.path.splitext(file_path)[-1] in VALID_ENDINGS:
        raise IOError("Not a valid vcf file name: {}".format(file_path))

    vcf_obj = VCF(file_path)

    return vcf_obj
312383
def _do_POSTGET(self, handler):
        """"""
        # at first, assume that the given path is the actual path and there are
        # no arguments
        self.server._dbg(self.path)

        self.path, self.args = _parse_url(self.path)

        # Extract POST data, if any. Clumsy syntax due to Python 2 and
        # 2to3's lack of a byte literal.
        self.data = u"".encode()
        length = self.headers.get('Content-Length')
        if length and length.isdigit():
            self.data = self.rfile.read(int(length))

        # POST data gets automatically decoded into Unicode. The bytestring
        # will still be available in the bdata attribute.
        self.bdata = self.data
        try:
            self.data = self.data.decode('utf8')
        except UnicodeDecodeError:
            self.data = None

        # Run the handler.
        try:
            handler()
        except:
            self.send_response(500)
            self.end_headers()
            self.wfile.write(format_exc().encode('utf8'))
774438
def dump_file_by_path(self, path, **kwargs):
        
        file = self.state.fs.get(path)
        if file is None:
            return None
        return file.concretize(**kwargs)
331983
def file_handler(self, handler_type, path, prefixed_path, source_storage):
        
        if self.faster:
            if prefixed_path not in self.found_files:
                self.found_files[prefixed_path] = (source_storage, path)

            self.task_queue.put({
                'handler_type': handler_type,
                'path': path,
                'prefixed_path': prefixed_path,
                'source_storage': source_storage
            })
            self.counter += 1
        else:
            if handler_type == 'link':
                super(Command, self).link_file(path, prefixed_path, source_storage)
            else:
                super(Command, self).copy_file(path, prefixed_path, source_storage)
1051677
def get_filehandle(self):
        """"""
        if os.path.exists(self.filename):
            self.filehandle = SD(self.filename, SDC.READ)
            logger.debug("Loading dataset {}".format(self.filename))
        else:
            raise IOError("Path {} does not exist.".format(self.filename))
1257211
public function readFile($path, $file_handle = NULL) {/*{{{*/
        return $this->_do_request('GET', $path, NULL, NULL, $file_handle);
    }