| GnomeVFS - Filesystem Abstraction library | ||||
|---|---|---|---|---|
enum GnomeVFSDirectoryVisitOptions; gboolean (*GnomeVFSDirectoryVisitFunc) (const gchar *rel_path, GnomeVFSFileInfo *info, gboolean recursing_will_loop, gpointer data, gboolean *recurse); GnomeVFSResult gnome_vfs_directory_open (GnomeVFSDirectoryHandle **handle, const gchar *text_uri, GnomeVFSFileInfoOptions options); GnomeVFSResult gnome_vfs_directory_open_from_uri (GnomeVFSDirectoryHandle **handle, GnomeVFSURI *uri, GnomeVFSFileInfoOptions options); GnomeVFSResult gnome_vfs_directory_read_next (GnomeVFSDirectoryHandle *handle, GnomeVFSFileInfo *file_info); GnomeVFSResult gnome_vfs_directory_close (GnomeVFSDirectoryHandle *handle); GnomeVFSResult gnome_vfs_directory_visit (const gchar *text_uri, GnomeVFSFileInfoOptions info_options, GnomeVFSDirectoryVisitOptions visit_options, GnomeVFSDirectoryVisitFunc callback, gpointer data); GnomeVFSResult gnome_vfs_directory_visit_uri (GnomeVFSURI *uri, GnomeVFSFileInfoOptions info_options, GnomeVFSDirectoryVisitOptions visit_options, GnomeVFSDirectoryVisitFunc callback, gpointer data); GnomeVFSResult gnome_vfs_directory_visit_files (const gchar *text_uri, GList *file_list, GnomeVFSFileInfoOptions info_options, GnomeVFSDirectoryVisitOptions visit_options, GnomeVFSDirectoryVisitFunc callback, gpointer data); GnomeVFSResult gnome_vfs_directory_visit_files_at_uri (GnomeVFSURI *uri, GList *file_list, GnomeVFSFileInfoOptions info_options, GnomeVFSDirectoryVisitOptions visit_options, GnomeVFSDirectoryVisitFunc callback, gpointer data); GnomeVFSResult gnome_vfs_directory_list_load (GList **list, const gchar *text_uri, GnomeVFSFileInfoOptions options);
typedef enum {
GNOME_VFS_DIRECTORY_VISIT_DEFAULT = 0,
GNOME_VFS_DIRECTORY_VISIT_SAMEFS = 1 << 0,
GNOME_VFS_DIRECTORY_VISIT_LOOPCHECK = 1 << 1
} GnomeVFSDirectoryVisitOptions;
This options control the way in which directories are visited.
gboolean (*GnomeVFSDirectoryVisitFunc) (const gchar *rel_path,
GnomeVFSFileInfo *info,
gboolean recursing_will_loop,
gpointer data,
gboolean *recurse);
| rel_path : | |
| info : | |
| recursing_will_loop : | |
| data : | |
| recurse : | |
| Returns : |
GnomeVFSResult gnome_vfs_directory_open (GnomeVFSDirectoryHandle **handle, const gchar *text_uri, GnomeVFSFileInfoOptions options);
Open directory text_uri for reading. On return, @*handle will point to a GnomeVFSDirectoryHandle object which can be used to read the directory entries one by one.
| handle : | pointer to a pointer to a GnomeVFSDirectoryHandle object. |
| text_uri : | string representing the uri to open. |
| options : | options for reading file information. |
| Returns : | an integer representing the result of the operation. |
GnomeVFSResult gnome_vfs_directory_open_from_uri (GnomeVFSDirectoryHandle **handle, GnomeVFSURI *uri, GnomeVFSFileInfoOptions options);
Open directory text_uri for reading. On return, @*handle will point to a GnomeVFSDirectoryHandle object which can be used to read the directory entries one by one.
| handle : | pointer to a pointer to a GnomeVFSDirectoryHandle object. |
| uri : | uri to open. |
| options : | options for reading file information. |
| Returns : | an integer representing the result of the operation. |
GnomeVFSResult gnome_vfs_directory_read_next (GnomeVFSDirectoryHandle *handle, GnomeVFSFileInfo *file_info);
Read the next directory entry from handle.
| handle : | a directory handle. |
| file_info : | pointer to a GnomeVFSFileInfo struct where the data about the directory at handle will be stored. |
| Returns : | an integer value representing the result of the operation. |
GnomeVFSResult gnome_vfs_directory_close (GnomeVFSDirectoryHandle *handle);
Close handle.
| handle : | a directory handle. |
| Returns : | an integer representing the result of the operation. |
GnomeVFSResult gnome_vfs_directory_visit (const gchar *text_uri, GnomeVFSFileInfoOptions info_options, GnomeVFSDirectoryVisitOptions visit_options, GnomeVFSDirectoryVisitFunc callback, gpointer data);
Visit text_uri, retrieving information as specified by info_options.
| text_uri : | string representation of uri to start from. |
| info_options : | options specifying what kind of file information must be retrieved. |
| visit_options : | options specifying the type of visit. |
| callback : | callback to be called for every visited file. |
| data : | data to be passed to callback at each iteration. |
| Returns : | a GnomeVFSResult indicating the success of the operation. |
GnomeVFSResult gnome_vfs_directory_visit_uri (GnomeVFSURI *uri, GnomeVFSFileInfoOptions info_options, GnomeVFSDirectoryVisitOptions visit_options, GnomeVFSDirectoryVisitFunc callback, gpointer data);
Visit uri, retrieving information as specified by info_options.
| uri : | uri to start from. |
| info_options : | options specifying what kind of file information must be retrieved. |
| visit_options : | options specifying the type of visit. |
| callback : | callback to be called for every visited file. |
| data : | data to be passed to callback at each iteration. |
| Returns : | a GnomeVFSResult indicating whether the operation succeeded. |
GnomeVFSResult gnome_vfs_directory_visit_files (const gchar *text_uri, GList *file_list, GnomeVFSFileInfoOptions info_options, GnomeVFSDirectoryVisitOptions visit_options, GnomeVFSDirectoryVisitFunc callback, gpointer data);
Fetches information about a list of files in a base uri uri.
| text_uri : | string representing the uri of a directory to visit the files in. |
| file_list : | GList of char *s of file names in uri to visit. |
| info_options : | bitmask controlling the type of information to fetch. |
| visit_options : | options controlling e.g. loop prevention, and filesystem checks. Affects the way visiting is done. |
| callback : | function to call with the file info structs. |
| data : | data to pass to callback. |
| Returns : | a GnomeVFSResult indicating the success of the operation. |
GnomeVFSResult gnome_vfs_directory_visit_files_at_uri (GnomeVFSURI *uri, GList *file_list, GnomeVFSFileInfoOptions info_options, GnomeVFSDirectoryVisitOptions visit_options, GnomeVFSDirectoryVisitFunc callback, gpointer data);
Fetches information about a list of files in a base uri uri.
| uri : | uri of a directory to visit the files in. |
| file_list : | GList of char *s of file names in uri to visit. |
| info_options : | bitmask controlling the type of information to fetch. |
| visit_options : | options controlling e.g. loop prevention, and filesystem checks. Affects the way visiting is done. |
| callback : | function to call with the file info structs. |
| data : | data to pass to callback. |
| Returns : | a GnomeVFSResult indicating the success of the operation. |
GnomeVFSResult gnome_vfs_directory_list_load (GList **list, const gchar *text_uri, GnomeVFSFileInfoOptions options);
Load a directory from text_uri with the specified options into a list.
| list : | address of a pointer to a list of GnomeVFSFileInfo. |
| text_uri : | a string representing the uri of the directory. |
| options : | options for loading the directory. |
| Returns : | an integer representing the result of the operation. |