Whole document tree
    

Whole document tree

Basic File I/O

Basic File I/O

Name

Basic File I/O -- synchronous file operations similar to posix calls, but using uris

Synopsis



GnomeVFSResult gnome_vfs_open               (GnomeVFSHandle **handle,
                                             const gchar *text_uri,
                                             GnomeVFSOpenMode open_mode);
GnomeVFSResult gnome_vfs_open_uri           (GnomeVFSHandle **handle,
                                             GnomeVFSURI *uri,
                                             GnomeVFSOpenMode open_mode);
GnomeVFSResult gnome_vfs_create             (GnomeVFSHandle **handle,
                                             const gchar *text_uri,
                                             GnomeVFSOpenMode open_mode,
                                             gboolean exclusive,
                                             guint perm);
GnomeVFSResult gnome_vfs_create_uri         (GnomeVFSHandle **handle,
                                             GnomeVFSURI *uri,
                                             GnomeVFSOpenMode open_mode,
                                             gboolean exclusive,
                                             guint perm);
GnomeVFSResult gnome_vfs_close              (GnomeVFSHandle *handle);
GnomeVFSResult gnome_vfs_read               (GnomeVFSHandle *handle,
                                             gpointer buffer,
                                             GnomeVFSFileSize bytes,
                                             GnomeVFSFileSize *bytes_read);
GnomeVFSResult gnome_vfs_write              (GnomeVFSHandle *handle,
                                             gconstpointer buffer,
                                             GnomeVFSFileSize bytes,
                                             GnomeVFSFileSize *bytes_written);
GnomeVFSResult gnome_vfs_seek               (GnomeVFSHandle *handle,
                                             GnomeVFSSeekPosition whence,
                                             GnomeVFSFileOffset offset);
GnomeVFSResult gnome_vfs_tell               (GnomeVFSHandle *handle,
                                             GnomeVFSFileSize *offset_return);
GnomeVFSResult gnome_vfs_get_file_info      (const gchar *text_uri,
                                             GnomeVFSFileInfo *info,
                                             GnomeVFSFileInfoOptionsoptions);
GnomeVFSResult gnome_vfs_get_file_info_uri  (GnomeVFSURI *uri,
                                             GnomeVFSFileInfo *info,
                                             GnomeVFSFileInfoOptionsoptions);
GnomeVFSResult gnome_vfs_get_file_info_from_handle
                                            (GnomeVFSHandle *handle,
                                             GnomeVFSFileInfo *info,
                                             GnomeVFSFileInfoOptionsoptions);
GnomeVFSResult gnome_vfs_truncate           (const gchar *text_uri,
                                             GnomeVFSFileSize length);
GnomeVFSResult gnome_vfs_truncate_uri       (GnomeVFSURI *uri,
                                             GnomeVFSFileSize length);
GnomeVFSResult gnome_vfs_truncate_handle    (GnomeVFSHandle *handle,
                                             GnomeVFSFileSize length);
GnomeVFSResult gnome_vfs_make_directory_for_uri
                                            (GnomeVFSURI *uri,
                                             guint perm);
GnomeVFSResult gnome_vfs_make_directory     (const gchar *text_uri,
                                             guint perm);
GnomeVFSResult gnome_vfs_remove_directory_from_uri
                                            (GnomeVFSURI *uri);
GnomeVFSResult gnome_vfs_remove_directory   (const gchar *text_uri);
GnomeVFSResult gnome_vfs_unlink_from_uri    (GnomeVFSURI *uri);
GnomeVFSResult gnome_vfs_create_symbolic_link
                                            (GnomeVFSURI *uri,
                                             const gchar *target_reference);
GnomeVFSResult gnome_vfs_unlink             (const gchar *text_uri);
GnomeVFSResult gnome_vfs_move_uri           (GnomeVFSURI *old_uri,
                                             GnomeVFSURI *new_uri,
                                             gboolean force_replace);
GnomeVFSResult gnome_vfs_move               (const gchar *old_text_uri,
                                             const gchar *new_text_uri,
                                             gboolean force_replace);
GnomeVFSResult gnome_vfs_check_same_fs_uris (GnomeVFSURI *source_uri,
                                             GnomeVFSURI *target_uri,
                                             gboolean *same_fs_return);
GnomeVFSResult gnome_vfs_check_same_fs      (const gchar *source,
                                             const gchar *target,
                                             gboolean *same_fs_return);
gboolean    gnome_vfs_uri_exists            (GnomeVFSURI *uri);
GnomeVFSResult gnome_vfs_set_file_info_uri  (GnomeVFSURI *uri,
                                             GnomeVFSFileInfo *info,
                                             GnomeVFSSetFileInfoMask mask);
GnomeVFSResult gnome_vfs_set_file_info      (const gchar *text_uri,
                                             GnomeVFSFileInfo *info,
                                             GnomeVFSSetFileInfoMask mask);

Description

Details

gnome_vfs_open ()

GnomeVFSResult gnome_vfs_open               (GnomeVFSHandle **handle,
                                             const gchar *text_uri,
                                             GnomeVFSOpenMode open_mode);

Open text_uri according to mode open_mode. On return, @*handle will then contain a pointer to a handle for the open file.


gnome_vfs_open_uri ()

GnomeVFSResult gnome_vfs_open_uri           (GnomeVFSHandle **handle,
                                             GnomeVFSURI *uri,
                                             GnomeVFSOpenMode open_mode);

Open uri according to mode open_mode. On return, @*handle will then contain a pointer to a handle for the open file.




gnome_vfs_close ()

GnomeVFSResult gnome_vfs_close              (GnomeVFSHandle *handle);

Close file associated with handle.


gnome_vfs_read ()

GnomeVFSResult gnome_vfs_read               (GnomeVFSHandle *handle,
                                             gpointer buffer,
                                             GnomeVFSFileSize bytes,
                                             GnomeVFSFileSize *bytes_read);

Read bytes from handle. As with Unix system calls, the number of bytes read can effectively be less than bytes on return and will be stored in @*bytes_read.


gnome_vfs_write ()

GnomeVFSResult gnome_vfs_write              (GnomeVFSHandle *handle,
                                             gconstpointer buffer,
                                             GnomeVFSFileSize bytes,
                                             GnomeVFSFileSize *bytes_written);

Write bytes into the file opened through handle. As with Unix system calls, the number of bytes written can effectively be less than bytes on return and will be stored in @*bytes_written.




gnome_vfs_get_file_info ()

GnomeVFSResult gnome_vfs_get_file_info      (const gchar *text_uri,
                                             GnomeVFSFileInfo *info,
                                             GnomeVFSFileInfoOptionsoptions);

Retrieve information about text_uri. The information will be stored in @*info.


gnome_vfs_get_file_info_uri ()

GnomeVFSResult gnome_vfs_get_file_info_uri  (GnomeVFSURI *uri,
                                             GnomeVFSFileInfo *info,
                                             GnomeVFSFileInfoOptionsoptions);

Retrieve information about text_uri. The information will be stored in info.


gnome_vfs_get_file_info_from_handle ()

GnomeVFSResult gnome_vfs_get_file_info_from_handle
                                            (GnomeVFSHandle *handle,
                                             GnomeVFSFileInfo *info,
                                             GnomeVFSFileInfoOptionsoptions);

Retrieve information about an open file. The information will be stored in @*info.


gnome_vfs_truncate ()

GnomeVFSResult gnome_vfs_truncate           (const gchar *text_uri,
                                             GnomeVFSFileSize length);


gnome_vfs_truncate_uri ()

GnomeVFSResult gnome_vfs_truncate_uri       (GnomeVFSURI *uri,
                                             GnomeVFSFileSize length);


gnome_vfs_truncate_handle ()

GnomeVFSResult gnome_vfs_truncate_handle    (GnomeVFSHandle *handle,
                                             GnomeVFSFileSize length);


gnome_vfs_make_directory_for_uri ()

GnomeVFSResult gnome_vfs_make_directory_for_uri
                                            (GnomeVFSURI *uri,
                                             guint perm);

Create uri as a directory.



gnome_vfs_remove_directory_from_uri ()

GnomeVFSResult gnome_vfs_remove_directory_from_uri
                                            (GnomeVFSURI *uri);

Remove uri. uri must be an empty directory.


gnome_vfs_remove_directory ()

GnomeVFSResult gnome_vfs_remove_directory   (const gchar *text_uri);


gnome_vfs_unlink_from_uri ()

GnomeVFSResult gnome_vfs_unlink_from_uri    (GnomeVFSURI *uri);

Unlink text_uri.


gnome_vfs_create_symbolic_link ()

GnomeVFSResult gnome_vfs_create_symbolic_link
                                            (GnomeVFSURI *uri,
                                             const gchar *target_reference);

Creates a symbolic link, or eventually, a URI link (as necessary) at uri pointing to target_reference


gnome_vfs_unlink ()

GnomeVFSResult gnome_vfs_unlink             (const gchar *text_uri);


gnome_vfs_move_uri ()

GnomeVFSResult gnome_vfs_move_uri           (GnomeVFSURI *old_uri,
                                             GnomeVFSURI *new_uri,
                                             gboolean force_replace);

Move a file from URI old_uri to new_uri. This will only work if old_uri and new_uri are on the same file system. Otherwise, it is necessary to use the more general %gnome_vfs_xfer_uri() function.


gnome_vfs_move ()

GnomeVFSResult gnome_vfs_move               (const gchar *old_text_uri,
                                             const gchar *new_text_uri,
                                             gboolean force_replace);

Move a file from URI old_text_uri to new_text_uri. This will only work if old_text_uri and new_text_uri are on the same file system. Otherwise, it is necessary to use the more general %gnome_vfs_xfer_uri() function.


gnome_vfs_check_same_fs_uris ()

GnomeVFSResult gnome_vfs_check_same_fs_uris (GnomeVFSURI *source_uri,
                                             GnomeVFSURI *target_uri,
                                             gboolean *same_fs_return);

Check if a and b are on the same file system.


gnome_vfs_check_same_fs ()

GnomeVFSResult gnome_vfs_check_same_fs      (const gchar *source,
                                             const gchar *target,
                                             gboolean *same_fs_return);

Check if a and b are on the same file system.


gnome_vfs_uri_exists ()

gboolean    gnome_vfs_uri_exists            (GnomeVFSURI *uri);

Check if the URI points to an existing entity.


gnome_vfs_set_file_info_uri ()

GnomeVFSResult gnome_vfs_set_file_info_uri  (GnomeVFSURI *uri,
                                             GnomeVFSFileInfo *info,
                                             GnomeVFSSetFileInfoMask mask);

Set file information for uri; only the information for which the corresponding bit in mask is set is actually modified.


gnome_vfs_set_file_info ()

GnomeVFSResult gnome_vfs_set_file_info      (const gchar *text_uri,
                                             GnomeVFSFileInfo *info,
                                             GnomeVFSSetFileInfoMask mask);

Set file information for uri; only the information for which the corresponding bit in mask is set is actually modified.