コード例 #1
0
    def testRead(self):
        """Test the read functionality."""
        file_object = zip_file_io.ZipFile(self._resolver_context,
                                          self._zip_path_spec)
        file_object.Open()

        self._TestReadFileObject(file_object)
コード例 #2
0
    def testOpenClosePathSpec(self):
        """Test the open and close functionality using a path specification."""
        file_object = zip_file_io.ZipFile(self._resolver_context,
                                          self._zip_path_spec)
        file_object.Open()

        self._TestGetSizeFileObject(file_object)
コード例 #3
0
ファイル: zip_file_io.py プロジェクト: slad99/dfvfs
    def testSeek(self):
        """Test the seek functionality."""
        file_object = zip_file_io.ZipFile(self._resolver_context)
        file_object.open(path_spec=self._zip_path_spec)

        self._TestSeekFileObject(file_object)

        file_object.close()
コード例 #4
0
    def NewFileObject(self, resolver_context):
        """Creates a new file-like object.

    Args:
      resolver_context (Context): resolver context.

    Returns:
      FileIO: file-like object.
    """
        return zip_file_io.ZipFile(resolver_context)