def testSize(self):
        """Test the size property."""
        file_entry = encrypted_stream_file_entry.EncryptedStreamFileEntry(
            self._resolver_context, self._file_system,
            self._encrypted_stream_path_spec)

        self.assertIsNotNone(file_entry)
        self.assertEqual(file_entry.size, 1247)
  def GetFileEntryByPathSpec(self, path_spec):
    """Retrieves a file entry for a path specification.

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

    Returns:
      A file entry (instance of vfs.FileEntry) or None.
    """
    return encrypted_stream_file_entry.EncryptedStreamFileEntry(
        self._resolver_context, self, path_spec, is_root=True, is_virtual=True)
Beispiel #3
0
    def GetFileEntryByPathSpec(self, path_spec):
        """Retrieves a file entry for a path specification.

    Args:
      path_spec (PathSpec): a path specification.

    Returns:
      EncryptedStreamFileEntry: a file entry or None if not available.
    """
        return encrypted_stream_file_entry.EncryptedStreamFileEntry(
            self._resolver_context,
            self,
            path_spec,
            is_root=True,
            is_virtual=True)
 def testInitialize(self):
     """Test the __init__ function."""
     file_entry = encrypted_stream_file_entry.EncryptedStreamFileEntry(
         self._resolver_context, self._file_system,
         self._encrypted_stream_path_spec)
     self.assertIsNotNone(file_entry)