def __init__(
      self, resolver_context, file_system, path_spec, fsntfs_file_entry=None,
      is_root=False, is_virtual=False):
    """Initializes the file entry object.

    Args:
      resolver_context (Context): resolver context.
      file_system (FileSystem): file system.
      path_spec (PathSpec): path specification.
      fsntfs_file_entry (Optional[pyfsntfs.file_entry]): NTFS file entry.
      is_root (Optional[bool]): True if the file entry is the root file entry
          of the corresponding file system.
      is_virtual (Optional[bool]): True if the file entry is a virtual file
          entry emulated by the corresponding file system.

    Raises:
      BackEndError: if the pyfsntfs file entry is missing.
    """
    if not fsntfs_file_entry:
      fsntfs_file_entry = file_system.GetNTFSFileEntryByPathSpec(path_spec)
    if not fsntfs_file_entry:
      raise errors.BackEndError('Missing pyfsntfs file entry.')

    super(NTFSFileEntry, self).__init__(
        resolver_context, file_system, path_spec, is_root=is_root,
        is_virtual=is_virtual)
    self._fsntfs_file_entry = fsntfs_file_entry

    if self._IsLink(fsntfs_file_entry.file_attribute_flags):
      self.entry_type = definitions.FILE_ENTRY_TYPE_LINK
    elif fsntfs_file_entry.has_directory_entries_index():
      self.entry_type = definitions.FILE_ENTRY_TYPE_DIRECTORY
    else:
      self.entry_type = definitions.FILE_ENTRY_TYPE_FILE
def __init__ ( self , resolver_context , file_system , path_spec , fsntfs_file_entry = None , is_root = False , is_virtual = False ) : if not fsntfs_file_entry : fsntfs_file_entry = file_system . GetNTFSFileEntryByPathSpec ( path_spec ) if not fsntfs_file_entry : raise errors . BackEndError ( 'Missing pyfsntfs file entry.' ) super ( NTFSFileEntry , self ) . __init__ ( resolver_context , file_system , path_spec , is_root = is_root , is_virtual = is_virtual ) self . _fsntfs_file_entry = fsntfs_file_entry if self . _IsLink ( fsntfs_file_entry . file_attribute_flags ) : self . entry_type = definitions . FILE_ENTRY_TYPE_LINK elif fsntfs_file_entry . has_directory_entries_index ( ) : self . entry_type = definitions . FILE_ENTRY_TYPE_DIRECTORY else : self . entry_type = definitions . FILE_ENTRY_TYPE_FILE
Initializes the file entry object.

    Args:
      resolver_context (Context): resolver context.
      file_system (FileSystem): file system.
      path_spec (PathSpec): path specification.
      fsntfs_file_entry (Optional[pyfsntfs.file_entry]): NTFS file entry.
      is_root (Optional[bool]): True if the file entry is the root file entry
          of the corresponding file system.
      is_virtual (Optional[bool]): True if the file entry is a virtual file
          entry emulated by the corresponding file system.

    Raises:
      BackEndError: if the pyfsntfs file entry is missing.