Check out the new USENIX Web site. next up previous
Next: Synchronous I/O Example Up: Synchronous API Previous: Synchronous API

The GnomeVFSHandle object

As in the Unix API, files need to be ``open'' before being ready to be read or written. But while the Unix API returns a simple integer to represent a ``file handle'', the GNOME VFS API provides a special object type for that, called GnomeVFSHandle.

GnomeVFSHandle objects are created using the ``open'' or ``create'' calls

    GnomeVFSResult
    gnome_vfs_open_uri
      (GnomeVFSHandle **handle return,
       GnomeVFSURI *uri,
       GnomeVFSOpenMode open mode)

    GnomeVFSResult
    gnome_vfs_create_uri
      (GnomeVFSHandle **handle return,
       GnomeVFSURI *uri,
       GnomeVFSOpenMode open mode,
       gboolean exclusive,
       guint perm)

and destroyed by using the ``close'' call:

    GnomeVFSResult
    gnome_vfs_close (GnomeVFSHandle *handle)



Ettore Perazzoli 2000-04-26