Top |
GCabCabinet * | gcab_cabinet_new () |
gboolean | gcab_cabinet_load () |
gboolean | gcab_cabinet_extract () |
gboolean | gcab_cabinet_extract_simple () |
GPtrArray * | gcab_cabinet_get_folders () |
gboolean | gcab_cabinet_add_folder () |
gboolean | gcab_cabinet_write () |
gboolean | gcab_cabinet_write_simple () |
const GByteArray * | gcab_cabinet_get_signature () |
guint32 | gcab_cabinet_get_size () |
A GCabCabinet is a handle to a Cabinet archive. It allows examining, extracting and creation of archives.
GCabCabinet *
gcab_cabinet_new (void
);
Create a new GCabCabinet object to read or create a Cabinet archive.
gboolean gcab_cabinet_load (GCabCabinet *cabinet
,GInputStream *stream
,GCancellable *cancellable
,GError **error
);
Load a cabinet archive.
gboolean gcab_cabinet_extract (GCabCabinet *cabinet
,GFile *path
,GCabFileCallback file_callback
,GFileProgressCallback progress_callback
,gpointer user_data
,GCancellable *cancellable
,GError **error
);
Extract files to given path.
If path
is NULL then the files are decompressed to memory blobs stored on
each GCabFile.
cabinet |
||
path |
the path to extract files. |
[allow-none] |
file_callback |
an optional GCabFile callback,
return |
[allow-none][scope call][closure user_data] |
progress_callback |
a progress callback. |
[allow-none][scope call][closure user_data] |
user_data |
callback data. |
[closure] |
cancellable |
optional GCancellable object,
|
[allow-none] |
error |
GError to set on error, or |
[allow-none] |
gboolean gcab_cabinet_extract_simple (GCabCabinet *cabinet
,GFile *path
,GCabFileCallback file_callback
,gpointer user_data
,GCancellable *cancellable
,GError **error
);
Extract files to given path.
cabinet |
||
path |
the path to extract files |
|
file_callback |
an optional GCabFile callback,
return |
[allow-none][scope call][closure user_data] |
user_data |
callback data. |
[closure] |
cancellable |
optional GCancellable object,
|
[allow-none] |
error |
GError to set on error, or |
[allow-none] |
GPtrArray *
gcab_cabinet_get_folders (GCabCabinet *cabinet
);
Get the Cabinet folders within the cabinet
.
Note that Cabinet folders are not like filesystem path, they are
group of files sharing some layout parameters.
gboolean gcab_cabinet_add_folder (GCabCabinet *cabinet
,GCabFolder *folder
,GError **error
);
Add folder
to cabinet
.
gboolean gcab_cabinet_write (GCabCabinet *cabinet
,GOutputStream *stream
,GCabFileCallback file_callback
,GFileProgressCallback progress_callback
,gpointer user_data
,GCancellable *cancellable
,GError **error
);
Save cabinet
to the output stream out
. out
must be a GSeekable.
cabinet |
||
stream |
a GOutputStream also GSeekable |
|
file_callback |
report current file being saved. |
[allow-none][scope call][closure user_data] |
progress_callback |
report saving progress. |
[allow-none][scope call][closure user_data] |
user_data |
user data to pass to callbacks. |
[closure] |
cancellable |
optional GCancellable object,
|
[allow-none] |
error |
GError to set on error, or |
[allow-none] |
gboolean gcab_cabinet_write_simple (GCabCabinet *cabinet
,GOutputStream *stream
,GCabFileCallback file_callback
,gpointer user_data
,GCancellable *cancellable
,GError **error
);
Save cabinet
to the output stream out
. out
must be a GSeekable.
cabinet |
||
stream |
a GOutputStream also GSeekable |
|
file_callback |
report current file being saved. |
[allow-none][scope call][closure user_data] |
user_data |
user data to pass to callbacks. |
[closure] |
cancellable |
optional GCancellable object,
|
[allow-none] |
error |
GError to set on error, or |
[allow-none] |
const GByteArray * gcab_cabinet_get_signature (GCabCabinet *cabinet
,GCancellable *cancellable
,GError **error
);
Lookup the cabinet authenticode signature if any.
cabinet |
||
cancellable |
optional GCancellable object,
|
[allow-none] |
error |
GError to set on error, or |
[allow-none] |
Since: 0.5
guint32
gcab_cabinet_get_size (GCabCabinet *cabinet
);
Get the size of the compressed cabinet file.
Since: 1.0