IBus.ObservedPath¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
is_dir |
r |
Whether the file is the path directory. |
|
is_exist |
r |
Whether the file exists. |
|
mtime |
r |
Modified time. |
|
parent |
r |
||
path |
r |
Path to be handled. |
Class Details¶
- class IBus.ObservedPath(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
IBus.ObservedPath
provides methods for file path manipulation, such as monitor modification, directory tree traversal.- classmethod new(path, fill_stat)¶
- Parameters:
- Returns:
A newly allocated
IBus.ObservedPath
.- Return type:
Creates a new
IBus.ObservedPath
from an XML node.
- classmethod new_from_xml_node(node, fill_stat)¶
- Parameters:
- Returns:
A newly allocated
IBus.ObservedPath
.- Return type:
Creates an new
IBus.ObservedPath
from an XML node.
- check_modification()¶
-
Checks whether the path is modified by comparing the mtime in object and mtime in file system.
- output(output, indent)¶
- Parameters:
output (
GLib.String
) – Path is appended to.indent (
int
) – number of indent.
Append the observed path to a string with following format: <path mtime=”<i>modified time</i>” ><i>path</i></path>
- traverse(dir_only)¶
- Parameters:
dir_only (
bool
) – Only looks for subdirs, not files- Returns:
A newly allocate
GLib.List
which holds content in path;None
if self is not directory.- Return type:
Recursively traverse the path and put the files and subdirectory in to a newly allocated GLists, if the self is a directory. Otherwise returns
None
.