GCab.File¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
bytes |
||
r/w |
file |
||
r/w |
name |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class GCab.File(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
An opaque object, referencing a file in a Cabinet.
- classmethod new_with_bytes(name, bytes)¶
- Parameters:
name (
str
) – name of the file within the cabinetbytes (
GLib.Bytes
) – aGLib.Bytes
to be added to the cabinet
- Returns:
a new
GCab.File
- Return type:
Create a
GCab.File
from a givenGLib.Bytes
.If this file is to be added to an archive you should also probably use
GCab.File.set_date
() andGCab.File.set_attributes
() to set sensible values.New in version 1.0.
- classmethod new_with_file(name, file)¶
- Parameters:
- Returns:
a new
GCab.File
- Return type:
Create a
GCab.File
from a givenGio.File
, to be added to aGCab.Cabinet
for archive creation.
- get_attributes()¶
- Returns:
the cabinet file attributes
- Return type:
Get the file attributes.
New in version 0.6.
- get_bytes()¶
- Returns:
the associated
GLib.Bytes
orNone
- Return type:
Get the
Gio.File
associated with self. This will only be non-None
if theGCab.File
has been created usingGCab.File.new_with_bytes
().New in version 1.0.
- get_date(result)¶
- Parameters:
result (
GLib.TimeVal
) – aGLib.TimeVal
to return date- Returns:
True
if tv was set- Return type:
Get the file date, in result.
New in version 0.6.
- get_date_time()¶
- Returns:
file date, or
None
if unknown.- Return type:
Gets the file date and returns it as a
GLib.DateTime
..New in version 1.4.
- get_file()¶
-
If the cabinet is being created, get the
Gio.File
associated with self. This must be an exisiting file that can be read, in order to be added to the archive during cabinet creation.If self is from an existing cabinet, the fuction will return
None
.
- set_attributes(attr)¶
- Parameters:
attr (
int
) – the attributes, e.g.GCab.FileAttribute.RDONLY
Set the file attributes.
New in version 1.0.
- set_bytes(bytes)¶
- Parameters:
bytes (
GLib.Bytes
) – aGLib.Bytes
Replace the
GLib.Bytes
associated with self. This is most usefule when theGCab.File
has been created usingGCab.File.new_with_bytes
() and the data needs to be modified.New in version 1.5.
- set_date(tv)¶
- Parameters:
tv (
GLib.TimeVal
) – aGLib.TimeVal
Sets the file modification date, instead of the value provided by the
Gio.File
.New in version 1.0.
- set_date_time(dt)¶
- Parameters:
dt (
GLib.DateTime
) – aGLib.DateTime
Sets the file modification date (instead of the date provided by the
Gio.File
)New in version 1.4.
Property Details¶
- GCab.File.props.bytes¶
- Name:
bytes
- Type:
- Default Value:
- Flags:
bytes