def _GetDirectory(self):
    """Retrieves a directory.

    Returns:
      APFSDirectory: directory or None if not available.
    """
    if self._fsapfs_file_entry.number_of_sub_file_entries <= 0:
      return None

    return APFSDirectory(self._file_system, self.path_spec)
Retrieves a directory.

    Returns:
      APFSDirectory: directory or None if not available.