def testGetFileEntryByPathSpec(self):
    file_system = zip_file_system.ZipFileSystem(self._resolver_context)
    self.assertIsNotNone(file_system)

    file_system.Open(self._zip_path_spec)

    path_spec = zip_path_spec.ZipPathSpec(
        location=u'/syslog', parent=self._os_path_spec)
    file_entry = file_system.GetFileEntryByPathSpec(path_spec)

    self.assertIsNotNone(file_entry)
    self.assertEqual(file_entry.name, u'syslog')

    path_spec = zip_path_spec.ZipPathSpec(
        location=u'/bogus', parent=self._os_path_spec)
    file_entry = file_system.GetFileEntryByPathSpec(path_spec)

    self.assertIsNone(file_entry)

    file_system.Close()
Tests the GetFileEntryByPathSpec function.
dataset/ETHPy150Open log2timeline/dfvfs/tests/vfs/zip_file_system.py/ZipFileSystemTest.testGetFileEntryByPathSpec