acquire.acquire.outputs.tar
¶
Module Contents¶
Classes¶
Tar archive acquire output format. Output can be compressed and/or encrypted. |
Attributes¶
- acquire.acquire.outputs.tar.TAR_COMPRESSION_METHODS¶
- class acquire.acquire.outputs.tar.TarOutput(path: pathlib.Path, compress: bool = False, compression_method: str = 'gzip', encrypt: bool = False, public_key: bytes | None = None)¶
Bases:
acquire.outputs.base.Output
Tar archive acquire output format. Output can be compressed and/or encrypted.
- Parameters:
path – The path to write the tar archive to.
compress – Whether to compress the tar archive.
compression_method – Compression method to use (Default: gzip). Supports “gzip”, “bzip2”, “xz”.
encrypt – Whether to encrypt the tar archive.
public_key – The RSA public key to encrypt the header with.
- compression = None¶
- path¶
- write(output_path: str, fh: BinaryIO, entry: dissect.target.filesystem.FilesystemEntry | pathlib.Path | None = None, size: int | None = None) None ¶
Write a file-like object to a tar file.
The data from
fh
is written, whileentry
is used to get some properties of the file.- Parameters:
output_path – The path of the entry in the output.
fh – The file-like object of the entry to write.
entry – The optional filesystem entry to write.
size – The optional file size in bytes of the entry to write.
- close() None ¶
Closes the tar file.