{{title}}

Status: NO-STATUS

This example shows how you can use standard C library file operation functions in Native Client using a library called nacl_io.

nacl_io provides a virtual filesystem. The filesystem can be "mounted" in a given directory tree. When you perform operations on files in those directories, the mount determines how those operations should be performed.

This example has four mounts by default.

  1. / the root of the filesystem. This is a memory mount, and is non-persistent.
  2. /persistent a persistent storage area. Any data written here can be read back after Chrome is restarted.
  3. /http a mount that can read from a URL. Try reading from /http/index.html.
  4. /dev a mount containing some utility files. /dev/null, /dev/zero, etc.

fopen fclose fread fwrite fseek stat
Filename: