Retrieves information about the file entry.

    Returns:
      VFSStat: a stat object.
185102
def _GetStat(self):
    
    stat_object = super(BDEFileEntry, self)._GetStat()

    stat_object.size = self._bde_volume.get_size()

    return stat_object
1353820
def getUptime(self):
        
        try:
            fp = open(uptimeFile, 'r')
            line = fp.readline()
            fp.close()
        except:
            raise IOError('Failed reading stats from file: %s' % uptimeFile)
        return float(line.split()[0])
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
961947
def get(self):
        
        res = self.fs.get_filesystem_details()
        res = res.to_dict()
        self.write(res)
285057
def IsDirectory(self):
    
    if self._stat_object is None:
      self._stat_object = self._GetStat()
    if self._stat_object is not None:
      self.entry_type = self._stat_object.type
    return self.entry_type == definitions.FILE_ENTRY_TYPE_DIRECTORY
1339716
public Nfs3FsStatResponse getFsStat(NfsFsStatRequest request) throws IOException {
        Nfs3FsStatResponse response = new Nfs3FsStatResponse();
        _rpcWrapper.callRpcNaked(request, response);
        return response;
    }
411396
def getVolInfo(*paths):
    '''
    
    '''
    path = os.path.join(*paths)
    path = os.path.expanduser(path)

    st = os.statvfs(path)

    free = st.f_bavail * st.f_frsize
    total = st.f_blocks * st.f_frsize

    return {
        'free': free,
        'used': total - free,
        'total': total,
    }
187546
def _GetStat(self):
    
    stat_object = super(VShadowFileEntry, self)._GetStat()

    if self._vshadow_store is not None:
      # File data stat information.
      stat_object.size = self._vshadow_store.volume_size

    # Ownership and permissions stat information.

    # File entry type stat information.

    # The root file entry is virtual and should have type directory.
    return stat_object
1279610
def retrieveVals(self):
        """"""
        file_stats = self._fileInfo.getContainerStats()
        for contname in self._fileContList:
            stats = file_stats.get(contname)
            if stats is not None:
                if self.hasGraph('rackspace_cloudfiles_container_size'):
                    self.setGraphVal('rackspace_cloudfiles_container_size', contname,
                                     stats.get('size'))
                if self.hasGraph('rackspace_cloudfiles_container_count'):
                    self.setGraphVal('rackspace_cloudfiles_container_count', contname,
                                     stats.get('count'))
619448
def getStats(self):
        
        stats = protocol.ReadStats()
        stats.aligned_read_count = self._numAlignedReads
        stats.unaligned_read_count = self._numUnalignedReads
        return stats
715069
def getIfaceStats(self):
        
        ifInfo = netiface.NetIfaceInfo()
        ifStats = ifInfo.getIfStats()
        info_dict = {}
        for ifname in ifStats:
            if re.match('^w\d+g\d+$', ifname):
                info_dict[ifname] = ifStats[ifname]        
        return info_dict
589016
def GetFileEntryByPathSpec(self, path_spec):
    
    # Opening a file by MFT entry is faster than opening a file by location.
    # However we need the index of the corresponding $FILE_NAME MFT attribute.
    fsntfs_file_entry = None
    location = getattr(path_spec, 'location', None)
    mft_attribute = getattr(path_spec, 'mft_attribute', None)
    mft_entry = getattr(path_spec, 'mft_entry', None)

    if (location == self.LOCATION_ROOT or
        mft_entry == self.MFT_ENTRY_ROOT_DIRECTORY):
      fsntfs_file_entry = self._fsntfs_volume.get_root_directory()
      return ntfs_file_entry.NTFSFileEntry(
          self._resolver_context, self, path_spec,
          fsntfs_file_entry=fsntfs_file_entry, is_root=True)

    try:
      if mft_attribute is not None and mft_entry is not None:
        fsntfs_file_entry = self._fsntfs_volume.get_file_entry(mft_entry)
      elif location is not None:
        fsntfs_file_entry = self._fsntfs_volume.get_file_entry_by_path(location)

    except IOError as exception:
      raise errors.BackEndError(exception)

    if fsntfs_file_entry is None:
      return None

    return ntfs_file_entry.NTFSFileEntry(
        self._resolver_context, self, path_spec,
        fsntfs_file_entry=fsntfs_file_entry)
1039864
def IsLink(self):
    
    if self._stat_object is None:
      self._stat_object = self._GetStat()
    if self._stat_object is not None:
      self.entry_type = self._stat_object.type
    return self.entry_type == definitions.FILE_ENTRY_TYPE_LINK
533163
def get_stats(self):
        
        stats = {
            "input_file": self.media_file.input_file,
            "output_file": self.media_file.output_file,
            "stream_id": self.stream_id
        }
        stats.update(self.loudness_statistics)
        return stats
1034647
def GetFilename(self):
    
    if not self._file_entry:
      return None

    data_stream = getattr(self._file_entry.path_spec, 'data_stream', None)
    if data_stream:
      return '{0:s}:{1:s}'.format(self._file_entry.name, data_stream)

    return self._file_entry.name
1259785
def vmstats():
    '''
    
    '''
    # Setup the SPI Structure
    spi = SYSTEM_PERFORMANCE_INFORMATION()
    retlen = ctypes.c_ulong()

    # 2 means to query System Performance Information and return it in a
    # SYSTEM_PERFORMANCE_INFORMATION Structure
    ctypes.windll.ntdll.NtQuerySystemInformation(
        2, ctypes.byref(spi), ctypes.sizeof(spi), ctypes.byref(retlen))

    # Return each defined field in a dict
    ret = {}
    for field in spi._fields_:
        ret.update({field[0]: getattr(spi, field[0])})

    return ret
522808
def GetLinkedFileEntry(self):
    
    link = self._GetLink()
    if not link:
      return None

    # TODO: is there a way to determine the identifier here?
    link_identifier = None

    parent_path_spec = getattr(self.path_spec, 'parent', None)
    path_spec = apfs_path_spec.APFSPathSpec(
        location=link, parent=parent_path_spec)

    is_root = bool(
        link == self._file_system.LOCATION_ROOT or
        link_identifier == self._file_system.ROOT_DIRECTORY_IDENTIFIER)

    return APFSFileEntry(
        self._resolver_context, self._file_system, path_spec, is_root=is_root)