Exemplo 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)
Exemplo 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)
Exemplo 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)
Exemplo 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)
Exemplo 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)
Exemplo 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)