def _GetDirectory(self): """Retrieves the directory. Returns: Directory: a directory or None. """ return file_entry.Directory(self._file_system, self.path_spec)
def testEntriesGenerator(self): """Tests the _EntriesGenerator function.""" test_directory = file_entry.Directory(self._file_system, self._path_spec) generator = test_directory._EntriesGenerator() self.assertIsNotNone(generator)
def testEntries(self): """Test the entries property.""" file_system = fake_file_system.FakeFileSystem(self._resolver_context) file_system.Open(self._fake_path_spec) test_directory = file_entry.Directory(file_system, self._fake_path_spec) self.assertEqual(list(test_directory.entries), []) file_system.Close()
def testEntries(self): """Tests the entries property.""" test_directory = file_entry.Directory(self._file_system, self._path_spec) self.assertEqual(list(test_directory.entries), [])