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

    Returns:
      A directory object (instance of Directory) or None.
    """
    if self._stat_object is None:
      self._stat_object = self._GetStat()

    if (self._stat_object and
        self._stat_object.type == self._stat_object.TYPE_DIRECTORY):
      return FakeDirectory(self._file_system, self.path_spec)
    return
dataset/ETHPy150Open log2timeline/dfvfs/dfvfs/vfs/fake_file_entry.py/FakeFileEntry._GetDirectory/original