Performs the equivalent of :func:`os.stat` on ``path``, returning a
    :class:`StatResult` object.
764413
def stat(path, user=None):
    
    host, port, path_ = split(path, user)
    fs = hdfs_fs.hdfs(host, port, user)
    retval = StatResult(fs.get_path_info(path_))
    if not host:
        _update_stat(retval, path_)
    fs.close()
    return retval
12166
def GetDataByPath(self, path):
    
    _, path_data = self._paths.get(path, (None, None))
    return path_data
252488
function stat(src) {
    return new Promise(resolve => {
        fs.stat(src, (err, stats) => err ? resolve(null) : resolve(stats));
    });
}
333542
def stat(self, follow_symlinks=True):
        
        if follow_symlinks:
            if self._statresult_symlink is None:
                file_object = self._filesystem.resolve(self.path)
                if self._filesystem.is_windows_fs:
                    file_object.st_nlink = 0
                self._statresult_symlink = file_object.stat_result.copy()
            return self._statresult_symlink

        if self._statresult is None:
            file_object = self._filesystem.lresolve(self.path)
            self._inode = file_object.st_ino
            if self._filesystem.is_windows_fs:
                file_object.st_nlink = 0
            self._statresult = file_object.stat_result.copy()
        return self._statresult
619720
def stats(path, hash_type=None, follow_symlinks=True):
    '''
    
    '''
    path = os.path.expanduser(path)

    ret = {}
    if not os.path.exists(path):
        try:
            # Broken symlinks will return False for os.path.exists(), but still
            # have a uid and gid
            pstat = os.lstat(path)
        except OSError:
            # Not a broken symlink, just a nonexistent path
            # NOTE: The file.directory state checks the content of the error
            # message in this exception. Any changes made to the message for this
            # exception will reflect the file.directory state as well, and will
            # likely require changes there.
            raise CommandExecutionError('Path not found: {0}'.format(path))
    else:
        if follow_symlinks:
            pstat = os.stat(path)
        else:
            pstat = os.lstat(path)
    ret['inode'] = pstat.st_ino
    ret['uid'] = pstat.st_uid
    ret['gid'] = pstat.st_gid
    ret['group'] = gid_to_group(pstat.st_gid)
    ret['user'] = uid_to_user(pstat.st_uid)
    ret['atime'] = pstat.st_atime
    ret['mtime'] = pstat.st_mtime
    ret['ctime'] = pstat.st_ctime
    ret['size'] = pstat.st_size
    ret['mode'] = six.text_type(oct(stat.S_IMODE(pstat.st_mode)))
    if hash_type:
        ret['sum'] = get_hash(path, hash_type)
    ret['type'] = 'file'
    if stat.S_ISDIR(pstat.st_mode):
        ret['type'] = 'dir'
    if stat.S_ISCHR(pstat.st_mode):
        ret['type'] = 'char'
    if stat.S_ISBLK(pstat.st_mode):
        ret['type'] = 'block'
    if stat.S_ISREG(pstat.st_mode):
        ret['type'] = 'file'
    if stat.S_ISLNK(pstat.st_mode):
        ret['type'] = 'link'
    if stat.S_ISFIFO(pstat.st_mode):
        ret['type'] = 'pipe'
    if stat.S_ISSOCK(pstat.st_mode):
        ret['type'] = 'socket'
    ret['target'] = os.path.realpath(path)
    return ret
29836
def from_path(cls, path: pathlib.Path) -> 'File':
        
        if not path.is_file():
            raise ValueError('Path does not point to a file')
        return File(path.name, path.stat().st_size, cls._md5(path))
141498
def get_results_path(self):
        
        result_path = os.path.join(RESULTS_ROOT, self.uuid)
        if not os.path.exists(result_path):
            os.makedirs(result_path)
        return result_path
147552
def stat(self, filename, timeout=None):
    """"""
    transport = StatFilesyncTransport(self.stream)
    transport.write_data('STAT', filename, timeout)
    stat_msg = transport.read_message(timeout)
    stat_msg.assert_command_is('STAT')
    return DeviceFileStat(filename, stat_msg.mode, stat_msg.size, stat_msg.time)
549889
def _GetStat(self):
    
    stat_object = vfs_stat.VFSStat()

    # File data stat information.
    stat_object.size = self.path_spec.range_size

    # File entry type stat information.
    stat_object.type = stat_object.TYPE_FILE

    return stat_object
680243
def _GetStat(self):
    
    stat_object = super(LVMFileEntry, self)._GetStat()

    if self._vslvm_logical_volume is not None:
      stat_object.size = self._vslvm_logical_volume.size

    return stat_object
310769
def _get_result_paths(self, data):
        
        assignment_fp = str(self.Parameters['-o'].Value).strip('"')
        if not os.path.isabs(assignment_fp):
            assignment_fp = os.path.relpath(assignment_fp, self.WorkingDir)
        return {'Assignments': ResultPath(assignment_fp, IsWritten=True)}
1042171
def islink(path):
    
    if platform.system() == "Windows":
        if sys.version_info[:2] < (3, 5):
            try:
                # pylint: disable=undefined-variable
                attrs = ctypes.windll.kernel32.GetFileAttributesW(unicode(path))  # noqa
                assert attrs != -1
                return bool(attrs & FILE_ATTRIBUTE_REPARSE_POINT)
            except (AttributeError, AssertionError):
                return False
        try:
            st = os.lstat(path)  # pylint: disable=invalid-name
        except (OSError, AttributeError):
            return False
        # pylint: disable=no-member
        return stat.S_ISLNK(st.st_mode) or st.st_file_attributes & stat.FILE_ATTRIBUTE_REPARSE_POINT
    return os.path.islink(path)
709039
def _get_result_paths(self, data):
        

        result = {}

        # OTU map (mandatory output)
        result['OtuMap'] = ResultPath(Path=self.Parameters['-O'].Value,
                                      IsWritten=True)

        # SumaClust will not produce any output file if the
        # input file was empty, so we create an empty
        # output file
        if not isfile(result['OtuMap'].Path):
            otumap_f = open(result['OtuMap'].Path, 'w')
            otumap_f.close()

        return result
728137
def mtime(path):
    
    if not os.path.exists(path):
        return -1
    stat = os.stat(path)
    return stat.st_mtime
813266
def evaluate(self, path):
        
        result = False
        cause = None

        for f in self.filters:

            cause, result = f.evaluate(path)
            if not result:
                break

        return cause, result
170955
def stats(self, indices=None):
        
        path = self.conn._make_path(indices, (), "_stats")
        return self.conn._send_request('GET', path)
815677
function stat(path, callback) {
        appshell.fs.stat(path, function (err, stats) {
            if (err) {
                callback(_mapError(err));
            } else {
                var options = {
                    isFile: stats.isFile(),
                    mtime: stats.mtime,
                    size: stats.size,
                    realPath: stats.realPath,
                    hash: stats.mtime.getTime()
                };

                var fsStats = new FileSystemStats(options);

                callback(null, fsStats);
            }
        });
    }