

def _EntriesGenerator(self):
    'Retrieves directory entries.\n\n    Since a directory can contain a vast number of entries using\n    a generator is more memory efficient.\n\n    Yields:\n      A path specification (instance of path.FakePathSpec).\n    '
    location = getattr(self.path_spec, 'location', None)
    if (location is None):
        return
    paths = self._file_system.GetPaths()
    for path in iter(paths.keys()):
        if ((not path) or (not path.startswith(location))):
            continue
        (_, suffix) = self._file_system.GetPathSegmentAndSuffix(location, path)
        if (suffix or (path == location)):
            continue
        path_spec_location = self._file_system.JoinPath([path])
        (yield fake_path_spec.FakePathSpec(location=path_spec_location))

dataset/ETHPy150Open log2timeline/dfvfs/dfvfs/vfs/fake_file_entry.py FakeDirectory._EntriesGenerator/original