Jcat.File¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Jcat.File(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
-
Creates a new file.
New in version 0.1.0.
- add_item(item)¶
-
Adds an item to a file.
New in version 0.1.0.
- export_file(gfile, flags, cancellable)¶
- Parameters:
gfile (
Gio.File) – #gfileflags (
Jcat.ExportFlags) – aJcat.ExportFlags, typicallyJcat.ExportFlags.NONEcancellable (
Gio.CancellableorNone) –Gio.Cancellable, orNone
- Raises:
- Returns:
Truefor success- Return type:
Exports a Jcat file to a compressed file.
New in version 0.1.0.
- export_json(flags)¶
- Parameters:
flags (
Jcat.ExportFlags) – aJcat.ExportFlags, typicallyJcat.ExportFlags.NONE- Raises:
- Returns:
JSON output, or
Nonefor error- Return type:
Exports a Jcat file to raw JSON.
New in version 0.1.0.
- export_stream(ostream, flags, cancellable)¶
- Parameters:
ostream (
Gio.OutputStream) –Gio.OutputStreamflags (
Jcat.ExportFlags) – aJcat.ExportFlags, typicallyJcat.ExportFlags.NONEcancellable (
Gio.CancellableorNone) –Gio.Cancellable, orNone
- Raises:
- Returns:
Truefor success- Return type:
Exports a Jcat file to a compressed stream.
New in version 0.1.0.
- get_item_by_id(id)¶
- Parameters:
id (
str) – An ID, typically a filename basename- Raises:
- Returns:
- Return type:
Finds the item with the specified ID, falling back to the ID alias if set.
New in version 0.1.0.
- get_item_default()¶
- Raises:
- Returns:
- Return type:
Finds the default item. If more than one
Jcat.Itemexists this function will return with an error.New in version 0.1.0.
- get_items()¶
- Returns:
all the items in the file
- Return type:
Returns all the items in the file.
New in version 0.1.0.
- get_version_major()¶
- Returns:
integer
- Return type:
Returns the major version number of the Jcat specification
New in version 0.1.0.
- get_version_minor()¶
- Returns:
integer
- Return type:
Returns the minor version number of the Jcat specification
New in version 0.1.0.
- import_file(gfile, flags, cancellable)¶
- Parameters:
gfile (
Gio.File) – #gfileflags (
Jcat.ImportFlags) –Jcat.ImportFlags, typicallyJcat.ImportFlags.NONEcancellable (
Gio.CancellableorNone) –Gio.Cancellable, orNone
- Raises:
- Returns:
Truefor success- Return type:
Imports a compressed Jcat file from an input stream.
New in version 0.1.0.
- import_json(json, flags)¶
- Parameters:
json (
str) – JSON dataflags (
Jcat.ImportFlags) –Jcat.ImportFlags, typicallyJcat.ImportFlags.NONE
- Raises:
- Returns:
Truefor success- Return type:
Imports a Jcat file from raw JSON.
New in version 0.1.0.
- import_stream(istream, flags, cancellable)¶
- Parameters:
istream (
Gio.InputStream) –Gio.InputStreamflags (
Jcat.ImportFlags) –Jcat.ImportFlags, typicallyJcat.ImportFlags.NONEcancellable (
Gio.CancellableorNone) –Gio.Cancellable, orNone
- Raises:
- Returns:
Truefor success- Return type:
Imports a compressed Jcat file from a file.
New in version 0.1.0.