Esempio n. 1
0
    def testIntialize(self):
        """Test the initialize functionality."""
        file_entry = gzip_file_entry.GzipFileEntry(self._resolver_context,
                                                   self._file_system,
                                                   self._gzip_path_spec)

        self.assertNotEqual(file_entry, None)
Esempio n. 2
0
    def testIntialize(self):
        """Test the __init__ function."""
        file_entry = gzip_file_entry.GzipFileEntry(self._resolver_context,
                                                   self._file_system,
                                                   self._gzip_path_spec)

        self.assertIsNotNone(file_entry)
Esempio n. 3
0
    def testSize(self):
        """Test the size property."""
        file_entry = gzip_file_entry.GzipFileEntry(self._resolver_context,
                                                   self._file_system,
                                                   self._gzip_path_spec)

        self.assertIsNotNone(file_entry)
        self.assertEqual(file_entry.size, 1247)
Esempio n. 4
0
    def testModificationTime(self):
        """Test the modification_time property."""
        file_entry = gzip_file_entry.GzipFileEntry(self._resolver_context,
                                                   self._file_system,
                                                   self._gzip_path_spec)

        self.assertIsNotNone(file_entry)
        self.assertIsNotNone(file_entry.modification_time)
Esempio n. 5
0
    def GetFileEntryByPathSpec(self, path_spec):
        """Retrieves a file entry for a path specification.

    Args:
      path_spec: a path specification (instance of path.PathSpec).

    Returns:
      A file entry (instance of vfs.FileEntry) or None.
    """
        return gzip_file_entry.GzipFileEntry(self._resolver_context,
                                             self,
                                             path_spec,
                                             is_root=True,
                                             is_virtual=True)
Esempio n. 6
0
    def GetFileEntryByPathSpec(self, path_spec):
        """Retrieves a file entry for a path specification.

    Args:
      path_spec (PathSpec): path specification.

    Returns:
      GzipFileEntry: a file entry or None if not available.
    """
        return gzip_file_entry.GzipFileEntry(self._resolver_context,
                                             self,
                                             path_spec,
                                             is_root=True,
                                             is_virtual=True)