Retrieves the file system type.

    Returns:
      pytsk3.TSK_FS_TYPE_ENUM: file system type.
354499
def GetFsType(self):
    
    if self._tsk_fs_type is None:
      self._tsk_fs_type = pytsk3.TSK_FS_TYPE_UNSUPP
      if (not self._tsk_file_system or
          not hasattr(self._tsk_file_system, 'info')):
        return self._tsk_fs_type

      self._tsk_fs_type = getattr(
          self._tsk_file_system.info, 'ftype', pytsk3.TSK_FS_TYPE_UNSUPP)

    return self._tsk_fs_type
593605
def type(self):
        
        kv_type = ctypes.c_char_p()
        check_call(_LIB.MXKVStoreGetType(self.handle, ctypes.byref(kv_type)))
        return py_str(kv_type.value)
96386
static StorageLocationType getType(StorageDirectory sd) {
    if ((sd instanceof NNStorageDirectory)) {
      return ((NNStorageDirectory) sd).type;
    } 
    // by default all are local
    return StorageLocationType.LOCAL;
  }
354217
def _GetStat(self):
    
    stat_object = super(TSKPartitionFileEntry, self)._GetStat()

    bytes_per_sector = tsk_partition.TSKVolumeGetBytesPerSector(
        self._tsk_volume)

    # File data stat information.
    if self._tsk_vs_part is not None:
      number_of_sectors = tsk_partition.TSKVsPartGetNumberOfSectors(
          self._tsk_vs_part)

      if number_of_sectors:
        stat_object.size = number_of_sectors * bytes_per_sector

    # Date and time stat information.

    # Ownership and permissions stat information.

    # File entry type stat information.

    # The root file entry is virtual and should have type directory.
    if not self._is_virtual:
      stat_object.is_allocated = tsk_partition.TSKVsPartIsAllocated(
          self._tsk_vs_part)

    return stat_object
959057
def get_type(self):
        
        if self.type_idx_value == None:
            self.type_idx_value = self.CM.get_type(self.type_idx)

        return self.type_idx_value
715756
def get_compression_type(self, file_name):
        

        ext = os.path.splitext(file_name)[1]

        if ext == '.gz':
            self.ctype = 'gzip'
        elif ext == '.bz2':
            self.ctype = 'bzip2'
        elif ext in ('.xz', '.lzma'):
            self.ctype = 'lzma'
        else:
            self.ctype = None
935441
def _get_access_type(self, mode):
        
        access_type = None
        for char in mode:  # figure out whether it's binary or text access
            if char in 'bt':
                if access_type is not None:
                    raise IOError('File mode "%s" contains contradictory flags' % mode)
                access_type = char
            elif char not in 'rbt':
                raise NotImplementedError(
                        '%s objects are read-only; unsupported mode "%s"'%
                        (type(self), mode))

        if access_type is None: access_type = 't'
        return access_type
495617
def file_system_path(self, file_system_path):
        
        if not isinstance(file_system_path, string_types):
            raise TypeError("file_system_path must be a string")
        self._file_system_path = file_system_path
732723
def get_type_name(type_name, sub_type=None):
    
    if type_name in ("string", "enum"):
        return "string"

    if type_name == "float":
        return "float64"

    if type_name == "boolean":
        return "bool"

    if type_name == "list":
        st = get_type_name(type_name=sub_type, sub_type=None) if sub_type else "interface{}"
        return "[]%s" % st

    if type_name == "integer":
        return "int"

    if type_name == "time":
        return "float64"

    return "interface{}"
5497
public static Type getType() {
        String osName = System.getProperty("os.name").toLowerCase();

        if (osName.contains("windows")) {
            return Type.WINDOWS;
        } else if (osName.contains("linux")) {
            return Type.LINUX;
        } else if (osName.contains("mac")) {
            return Type.MAC;
        }

        return Type.UNKNOWN;
    }
1141729
def struct_types(self):
        
        it = ffi.lib.LLVMPY_ModuleTypesIter(self)
        return _TypesIterator(it, dict(module=self))
782697
def IsNTFS(self):
    
    tsk_fs_type = self.GetFsType()
    return tsk_fs_type in [
        pytsk3.TSK_FS_TYPE_NTFS, pytsk3.TSK_FS_TYPE_NTFS_DETECT]
809322
def system_types():
    '''
    
    '''
    ret = {}
    for line in __salt__['cmd.run']('sfdisk -T').splitlines():
        if not line:
            continue
        if line.startswith('Id'):
            continue
        comps = line.strip().split()
        ret[comps[0]] = comps[1]
    return ret
513775
def files_type(fs0, fs1, files):
    """"""
    for file_meta in files['deleted_files']:
        file_meta['type'] = fs0.file(file_meta['path'])
    for file_meta in files['created_files'] + files['modified_files']:
        file_meta['type'] = fs1.file(file_meta['path'])

    return files
1259335
public String getFileType() {
        if (fileTypeOrName != null && fileTypeOrName.contains(".")) {
            return FileUtils.getExtension(fileTypeOrName);
        } else {
            return fileTypeOrName;
        }
    }
166510
def get_mimetype(self, path):
        '''
        
        '''
        for fnc in self._mimetype_functions:
            mime = fnc(path)
            if mime:
                return mime
        return mimetype.by_default(path)
1021994
def _GetDirectory(self):
    
    if self._fsntfs_file_entry.number_of_sub_file_entries == 0:
      return None
    return NTFSDirectory(self._file_system, self.path_spec)