Reading and Writing
Reading and Writing —
Description
Details
enum GnomeVFSSeekPosition
typedef enum {
GNOME_VFS_SEEK_START,
GNOME_VFS_SEEK_CURRENT,
GNOME_VFS_SEEK_END
} GnomeVFSSeekPosition;
| GNOME_VFS_SEEK_START | Start of the file.
|
| GNOME_VFS_SEEK_CURRENT | Current position.
|
| GNOME_VFS_SEEK_END | End of the file.
|
gnome_vfs_read ()
GnomeVFSResult gnome_vfs_read (GnomeVFSHandle *handle,
gpointer buffer,
GnomeVFSFileSize bytes,
GnomeVFSFileSize *bytes_read);
| handle : | Handle of the file to read data from
|
| buffer : | Pointer to a buffer that must be at least bytes bytes large
|
| bytes : | Number of bytes to read
|
| bytes_read : | Pointer to a variable that will hold the number of bytes
effectively read on return.
|
| Returns : | An integer representing the result of the operation
|
gnome_vfs_write ()
GnomeVFSResult gnome_vfs_write (GnomeVFSHandle *handle,
gconstpointer buffer,
GnomeVFSFileSize bytes,
GnomeVFSFileSize *bytes_written);
| handle : | Handle of the file to write data to
|
| buffer : | Pointer to the buffer containing the data to be written
|
| bytes : | Number of bytes to write
|
| bytes_written : | Pointer to a variable that will hold the number of bytes
effectively written on return.
|
| Returns : | An integer representing the result of the operation
|
gnome_vfs_seek ()
GnomeVFSResult gnome_vfs_seek (GnomeVFSHandle *handle,
GnomeVFSSeekPosition whence,
GnomeVFSFileOffset offset);
| handle : | Handle for which the current position must be changed
|
| whence : | Integer value representing the starting position
|
| offset : | Number of bytes to skip from the position specified by whence
(a positive value means to move forward; a negative one to move backwards)
|
| Returns : |
|
gnome_vfs_tell ()
GnomeVFSResult gnome_vfs_tell (GnomeVFSHandle *handle,
GnomeVFSFileSize *offset_return);
| handle : | Handle for which the current position must be retrieved
|
| offset_return : | Pointer to a variable that will contain the current position
on return
|
| Returns : | An integer representing the result of the operation
|