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

    Args:
      resolver_context (Context): resolver context.
      file_system (FileSystem): file system.
      path_spec (PathSpec): path specification.
      fsapfs_file_entry (Optional[pyfsapfs.file_entry]): APFS 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 pyfsapfs file entry is missing.
    """
    if not fsapfs_file_entry:
      fsapfs_file_entry = file_system.GetAPFSFileEntryByPathSpec(path_spec)
    if not fsapfs_file_entry:
      raise errors.BackEndError('Missing pyfsapfs file entry.')

    super(APFSFileEntry, self).__init__(
        resolver_context, file_system, path_spec, is_root=is_root,
        is_virtual=is_virtual)
    self._fsapfs_file_entry = fsapfs_file_entry

    self.entry_type = self._ENTRY_TYPES.get(
        fsapfs_file_entry.file_mode & 0xf000, None)
def __init__ ( self , resolver_context , file_system , path_spec , fsapfs_file_entry = None , is_root = False , is_virtual = False ) : if not fsapfs_file_entry : fsapfs_file_entry = file_system . GetAPFSFileEntryByPathSpec ( path_spec ) if not fsapfs_file_entry : raise errors . BackEndError ( 'Missing pyfsapfs file entry.' ) super ( APFSFileEntry , self ) . __init__ ( resolver_context , file_system , path_spec , is_root = is_root , is_virtual = is_virtual ) self . _fsapfs_file_entry = fsapfs_file_entry self . entry_type = self . _ENTRY_TYPES . get ( fsapfs_file_entry . file_mode & 0xf000 , None )
Initializes a file entry.

    Args:
      resolver_context (Context): resolver context.
      file_system (FileSystem): file system.
      path_spec (PathSpec): path specification.
      fsapfs_file_entry (Optional[pyfsapfs.file_entry]): APFS 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 pyfsapfs file entry is missing.