![]() |
![]() |
![]() |
Libfm Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites |
FmFile; struct FmFileInitTable; struct FmFileInterface; #define FM_MODULE_vfs_VERSION extern FmFileInitTable fm_module_init_vfs; void fm_file_add_vfs (const char *name
,FmFileInitTable *init
); GFile * fm_file_new_for_commandline_arg (const char *arg
); GFile * fm_file_new_for_uri (const char *uri
); gboolean fm_file_wants_incremental (GFile *file
);
include
: libfm/fm.h
The FmFile represents interface to build extensions to GFile which will handle schemas that are absent in Glib/GVFS - such as "search:".
To use it the GFile implementation should also implement FmFile vtable
calls. The implementation should be added to list of known schemes via
call to fm_file_add_vfs()
then calls such as fm_file_new_for_uri()
can
use it.
struct FmFileInitTable { GFile * (*new_for_uri)(const char *uri); };
Functions to initialize FmFile instance.
This structure is used for "vfs" module initialization. The key for module of this type is scheme name to support.
function to create new GFile object from URI |
struct FmFileInterface { gboolean (*wants_incremental)(GFile* file); };
VTable func, see fm_file_wants_incremental()
|
void fm_file_add_vfs (const char *name
,FmFileInitTable *init
);
Adds VFS to list of extensions that will be applied on next call to
fm_file_new_for_uri()
or fm_file_new_for_commandline_arg()
. The name
is a schema which will be handled by those calls.
|
scheme to act upon |
|
table of functions |
Since 1.0.2
GFile * fm_file_new_for_commandline_arg (const char *arg
);
Creates a GFile with the given argument from the command line.
The value of arg
can be either a URI, an absolute path or
a relative path resolved relative to the current working directory.
This operation never fails, but the returned object might not support
any I/O operation if arg
points to a malformed path.
|
a command line string |
Returns : |
a new GFile. |
Since 1.0.2
GFile * fm_file_new_for_uri (const char *uri
);
Constructs a GFile for a given URI. This operation never fails,
but the returned object might not support any I/O operation if uri
is malformed or if the uri type is not supported.
|
a UTF8 string containing a URI |
Returns : |
a new GFile. |
Since 1.0.2
gboolean fm_file_wants_incremental (GFile *file
);
Checks if contents of directory file
cannot be retrieved at once so
scanning it may be done in incremental manner for the best results.
|
file to inspect |
Returns : |
TRUE if retrieve of contents of file will be incremental. |
Since 1.0.2