GCab.Cabinet¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
Reserved |
||
r/w |
Signature |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class GCab.Cabinet(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
An opaque object holding a Cabinet file reference.
- classmethod new()¶
- Returns:
a new
GCab.Cabinet- Return type:
Create a new
GCab.Cabinetobject to read or create a Cabinet archive.
- add_allowed_compression(compression)¶
- Parameters:
compression (
GCab.Compression) – aGCab.Compressionkind, e.g.GCab.Compression.MSZIP
Adds a compression kind to the allow-list. By default, GCab will use all decompression support compiled in at build time. Once this function has been called only specific compression kinds will be used in functions like
GCab.Cabinet.load().New in version 1.6.
- add_folder(folder)¶
- Parameters:
folder (
GCab.Folder) – aGCab.Folder- Raises:
- Returns:
Trueon success.- Return type:
Add folder to self.
- extract(path, file_callback, progress_callback, user_data, cancellable)¶
- Parameters:
file_callback (
GCab.FileCallbackorNone) – an optionalGCab.Filecallback, returnFalseto filter out or skip files.progress_callback (
Gio.FileProgressCallbackorNone) – a progress callbackcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore
- Raises:
- Returns:
Trueon success.- Return type:
Extract files to given path.
If path is
Nonethen the files are decompressed to memory blobs stored on eachGCab.File.
- extract_simple(path, file_callback, user_data, cancellable)¶
- Parameters:
path (
Gio.File) – the path to extract filesfile_callback (
GCab.FileCallbackorNone) – an optionalGCab.Filecallback, returnFalseto filter out or skip files.cancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore
- Raises:
- Returns:
Trueon success.- Return type:
Extract files to given path.
- get_folders()¶
- Returns:
an array of
GCab.Folder- Return type:
Get the Cabinet folders within the self. Note that Cabinet folders are not like filesystem path, they are group of files sharing some layout parameters.
- get_signature(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore- Raises:
- Returns:
the array containing the PKCS#7 signed data or
Noneon error.- Return type:
Lookup the cabinet authenticode signature if any.
New in version 0.5.
- get_size()¶
- Returns:
size in bytes
- Return type:
Get the size of the compressed cabinet file.
New in version 1.0.
- load(stream, cancellable)¶
- Parameters:
stream (
Gio.InputStream) – aGio.InputStreamcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore
- Raises:
- Returns:
Trueon success- Return type:
Load a cabinet archive.
- write(stream, file_callback, progress_callback, user_data, cancellable)¶
- Parameters:
stream (
Gio.OutputStream) – aGio.OutputStreamalsoGio.Seekablefile_callback (
GCab.FileCallbackorNone) – report current file being savedprogress_callback (
Gio.FileProgressCallbackorNone) – report saving progresscancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore
- Raises:
- Returns:
Trueon success.- Return type:
Save self to the output stream out. out must be a
Gio.Seekable.
- write_simple(stream, file_callback, user_data, cancellable)¶
- Parameters:
stream (
Gio.OutputStream) – aGio.OutputStreamalsoGio.Seekablefile_callback (
GCab.FileCallbackorNone) – report current file being savedcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore
- Raises:
- Returns:
Trueon success.- Return type:
Save self to the output stream out. out must be a
Gio.Seekable.
Property Details¶
- GCab.Cabinet.props.reserved¶
- Name:
reserved- Type:
- Default Value:
- Flags:
Reserved
- GCab.Cabinet.props.signature¶
- Name:
signature- Type:
- Default Value:
- Flags:
Signature