Retrieves the root file entry.

    Returns:
      APFSContainerFileEntry: a file entry.
180390
def GetRootFileEntry(self):
    
    path_spec = apfs_container_path_spec.APFSContainerPathSpec(
        location=self.LOCATION_ROOT, parent=self._path_spec.parent)
    return self.GetFileEntryByPathSpec(path_spec)
1144560
def _GetSubFileEntries(self):
    
    if self._directory is None:
      self._directory = self._GetDirectory()

    if self._directory:
      for path_spec in self._directory.entries:
        yield TSKFileEntry(self._resolver_context, self._file_system, path_spec)
960007
def GetParentFileEntry(self):
    
    store_index = vshadow.VShadowPathSpecGetStoreIndex(self.path_spec)
    if store_index is None:
      return None

    return self._file_system.GetRootFileEntry()
1888
def GetFileEntryByPathSpec(self, path_spec):
    
    return bde_file_entry.BDEFileEntry(
        self._resolver_context, self, path_spec, is_root=True, is_virtual=True)
33421
def get_root_folder(service_instance):
    '''
    
    '''
    try:
        log.trace('Retrieving root folder')
        return service_instance.RetrieveContent().rootFolder
    except vim.fault.NoPermission as exc:
        log.exception(exc)
        raise salt.exceptions.VMwareApiError(
            'Not enough permissions. Required privilege: '
            '{}'.format(exc.privilegeId))
    except vim.fault.VimFault as exc:
        log.exception(exc)
        raise salt.exceptions.VMwareApiError(exc.msg)
    except vmodl.RuntimeFault as exc:
        log.exception(exc)
        raise salt.exceptions.VMwareRuntimeError(exc.msg)
10532
def GetLinkedFileEntry(self):
    
    link = self._GetLink()
    if not link:
      return None

    # TODO: is there a way to determine the link inode number here?
    link_inode = None

    parent_path_spec = getattr(self.path_spec, 'parent', None)
    path_spec = tsk_path_spec.TSKPathSpec(
        location=link, parent=parent_path_spec)

    root_inode = self._file_system.GetRootInode()
    is_root = bool(
        link == self._file_system.LOCATION_ROOT or (
            link_inode is not None and root_inode is not None and
            link_inode == root_inode))

    return TSKFileEntry(
        self._resolver_context, self._file_system, path_spec, is_root=is_root)
718544
def search_app_root():
        
        while True:

            current = os.getcwd()

            if pathlib.Path("apps.py").is_file():
                return current
            elif pathlib.Path.cwd() == "/":
                raise FileNotFoundError
            else:
                os.chdir("../")
1232457
public static RootContainer getRootContainer(final EntityContainer container) {
	// Root must be identifable
	if (!(container instanceof Identifiable)) {
	    return null;
	}

	EntityContainer parent = container instanceof Entity ? ((Entity) container).getContainer() : null;
	UUID rootID = null;

	// Check not root
	if (parent == null) {
	    rootID = ((Identifiable) container).getID();
	}
	// Get parents root
	else if (container instanceof Taggable) {
	    final RootContainer parentRoot = ((Taggable) container).getSingletonTag(RootContainer.class);
	    if (parentRoot != null) {
		rootID = parentRoot.getValue();
	    }
	}

	// Find root
	if (rootID == null) {
	    // Get top level entity
	    while (parent instanceof Entity) {
		final Entity e = (Entity) parent;
		rootID = e.getID();
		parent = e.getContainer();
	    }
	    // Container root (null, container or JALSE)
	    if (!(parent instanceof Identifiable)) {
		return null;
	    }
	}

	return new RootContainer(rootID);
    }
1058464
def GetParentFileEntry(self):
    
    location = getattr(self.path_spec, 'location', None)
    if location is None:
      return None
    parent_inode = self._parent_inode
    parent_location = self._file_system.DirnamePath(location)
    if parent_inode is None and parent_location is None:
      return None

    if parent_location == '':
      parent_location = self._file_system.PATH_SEPARATOR

    root_inode = self._file_system.GetRootInode()
    is_root = bool(
        parent_location == self._file_system.LOCATION_ROOT or (
            parent_inode is not None and root_inode is not None and
            parent_inode == root_inode))

    parent_path_spec = getattr(self.path_spec, 'parent', None)
    path_spec = tsk_path_spec.TSKPathSpec(
        inode=parent_inode, location=parent_location, parent=parent_path_spec)
    return TSKFileEntry(
        self._resolver_context, self._file_system, path_spec, is_root=is_root)
697312
def GetFileEntryByPathSpec(self, path_spec):
    
    return encoded_stream_file_entry.EncodedStreamFileEntry(
        self._resolver_context, self, path_spec, is_root=True, is_virtual=True)
104920
def GetRootFileEntry(self):
    
    path_spec = cpio_path_spec.CPIOPathSpec(
        location=self.LOCATION_ROOT, parent=self._path_spec.parent)
    return self.GetFileEntryByPathSpec(path_spec)
499564
def _GetFileSystemTypeFromFileEntry(self, file_entry):
    
    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
1370056
def GetParentFileEntry(self):
    
    volume_index = apfs_helper.APFSContainerPathSpecGetVolumeIndex(
        self.path_spec)
    if volume_index is None:
      return None

    return self._file_system.GetRootFileEntry()
549889
def _GetStat(self):
    
    stat_object = vfs_stat.VFSStat()

    # File data stat information.
    stat_object.size = self.path_spec.range_size

    # File entry type stat information.
    stat_object.type = stat_object.TYPE_FILE

    return stat_object
90291
def GetFileEntryByPathSpec(self, path_spec):
    
    if not self.FileEntryExistsByPathSpec(path_spec):
      return None
    return os_file_entry.OSFileEntry(self._resolver_context, self, path_spec)
747423
public static String getRootDirURI(File parentDir) {
        String pathAsString = parentDir.getAbsolutePath() + System.getProperty("file.separator") + Names.EKSTAZI_ROOT_DIR_NAME;
        return new File(pathAsString).toURI().toString();
    }
659388
static RegistryEntry getEntry(VirtualFile virtualFile) {
        if (virtualFile == null) {
            throw MESSAGES.nullArgument("VirutalFile");
        }
        return rootEntry.find(virtualFile);
    }