Foundry.FileManager¶
- Subclasses:
None
Methods¶
- Inherited:
Foundry.Service (8), Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)
- Structs:
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Foundry.FileManager(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Manages file operations and provides file system abstraction.
Foundry.FileManagerhandles file creation, deletion, monitoring, and provides a unified interface for working with files across different backends. It also manages file attributes, search functionality, and integrates with the VCS system for version control operations.- find_symbolic_icon(content_type, filename)¶
- Parameters:
- Returns:
- Return type:
Either content_type or filename should be provided, or both.
This function is similar to
Gio.content_type_get_symbolic_icon() except that it takes our bundled icons into account to ensure that they are taken at a higher priority than the fallbacks from the current icon theme.
- guess_language(file, content_type, contents)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to a string containing the language identifier, or rejects with error.
- Return type:
Attempts to guess the language of file, content_type, or contents.
One of file, content_type, or contents must be set.
- read_metadata(file, attributes)¶
- Parameters:
- Returns:
a [class`Dex`.Future] that resolves to a [class`Gio`.FileInfo].
- Return type:
Reads the metadata associated with a file.
- search(options, operation)¶
- Parameters:
options (
Foundry.FileSearchOptions) – the options for the searchoperation (
Foundry.Operation) – the operation tracker
- Returns:
a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.FileSearchMatch] or rejects with error.
- Return type:
This function will complete before the operation has fully completed searching all targets. You may wait for all search results to be populated by using [func`Foundry`.list_model_await].
New in version 1.1.
- show(file)¶
- Parameters:
file (
Gio.File) –- Returns:
a [class`Dex`.Future] that resolves to
trueif successful- Return type:
Requests that file is shown in the users default file-manager.
For example, on GNOME this would open Nautilus.
- write_metadata(file, file_info)¶
- Parameters:
file (
Gio.File) – a [iface`Gio`.File]file_info (
Gio.FileInfo) – a [class`Gio`.FileInfo]
- Returns:
a [class`Dex`.Future] that resolves to a boolean or rejects with error.
- Return type:
file_info must only contain attributes starting with ‘metadata::’