GIO is striving to provide a modern, easy-to-use VFS API that sits at the right level in the library stack, as well as other generally useful APIs for desktop applications (such as networking and D-Bus support). The goal is to overcome the shortcomings of GnomeVFS and provide an API that is so good that developers prefer it over raw POSIX calls. Among other things that means using GObject. It also means not cloning the POSIX API, but providing higher-level, document-centric interfaces.

The abstract file system model of GIO consists of a number of interfaces and base classes for I/O and files:


reference to a file


information about a file or filesystem


list files in directories


represents a drive


represents a file system in an abstract way


represents a mounted file system

Then there is a number of stream classes, similar to the input and output stream hierarchies that can be found in frameworks like Java:


read data


write data


read and write data


interface optionally implemented by streams to support seeking

There are interfaces related to applications and the types of files they handle:


information about an installed application


abstract type for file and application icons

There is a framework for storing and retrieving application settings:


stores and retrieves application settings

There is support for network programming, including connectivity monitoring, name resolution, lowlevel socket APIs and highlevel client and server helper classes:


lowlevel platform independent socket object


asynchronous and cancellable DNS resolver


high-level network client helper


high-level network server helper


network connection stream


network connectivity monitoring

There is support for connecting to D-Bus, sending and receiving messages, owning and watching bus names, and making objects available on the bus:


a D-Bus connection


for handling remote calls


helper for accepting connections


proxy to access D-Bus interfaces on a remote object

Beyond these, GIO provides facilities for file monitoring, asynchronous I/O and filename completion. In addition to the interfaces, GIO provides implementations for the local case. Implementations for various network file systems are provided by the GVFS package as loadable modules.

Other design choices which consciously break with the GnomeVFS design are to move backends out-of-process, which minimizes the dependency bloat and makes the whole system more robust. The backends are not included in GIO, but in the separate GVFS package. The GVFS package also contains the GVFS daemon, which spawn further mount daemons for each individual connection.

Figure 1. GIO in the GTK+ library stack

GIO in the GTK+ library stack

The GIO model of I/O is stateful: if an application establishes e.g. a SFTP connection to a server, it becomes available to all applications in the session; the user does not have to enter their password over and over again.

One of the big advantages of putting the VFS in the GLib layer is that GTK+ can directly use it, e.g. in the filechooser.