def _GetFileSystemTypeFromFileEntry(self, file_entry):
    """Retrieves the file system type indicator of a file entry.

    Args:
      file_entry (dfvfs.FileEntry): a file entry.

    Returns:
      str: file system type.
    """
    if file_entry.type_indicator != dfvfs_definitions.TYPE_INDICATOR_TSK:
      return file_entry.type_indicator

    # TODO: Implement fs_type in dfVFS and remove this implementation
    # once that is in place.
    file_system = file_entry.GetFileSystem()
    fs_info = file_system.GetFsInfo()
    if fs_info.info:
      type_string = '{0!s}'.format(fs_info.info.ftype)
      if type_string.startswith('TSK_FS_TYPE_'):
        type_string = type_string[12:]
      if type_string.endswith('_DETECT'):
        type_string = type_string[:-7]

    return type_string
def _GetFileSystemTypeFromFileEntry ( self , file_entry ) : if file_entry . type_indicator != dfvfs_definitions . TYPE_INDICATOR_TSK : return file_entry . type_indicator file_system = file_entry . GetFileSystem ( ) fs_info = file_system . GetFsInfo ( ) if fs_info . info : type_string = '{0!s}' . format ( fs_info . info . ftype ) if type_string . startswith ( 'TSK_FS_TYPE_' ) : type_string = type_string [ 12 : ] if type_string . endswith ( '_DETECT' ) : type_string = type_string [ : - 7 ] return type_string
Retrieves the file system type indicator of a file entry.

    Args:
      file_entry (dfvfs.FileEntry): a file entry.

    Returns:
      str: file system type.