Chapter 16. Usage

Table of Contents
FILEIO Interface
MMFSLib

MMFS is accessed through the FILEIO package which presents a standard POSIX compatible IO interface through which applications use standard open(), read(), write() and close() calls. Streaming support is provided through a small library, mmfslib, that presents a more application-friendly interface.

FILEIO Interface

MMFS supplies most of the standard file IO functionality. However, since it is optimized for supporting streamed data, it has a number of restrictions that mean that it does not always behave like a general-purpose filesystem.

  • Files may not be resized after creation and are essentially write-once/read-many. Between the initial open() and close() that creates a file it will be extended as requires. On subsequent opens, even those that specify O_WRITE, data may only be written to the existing file extent.

  • If an attempt is made to create a file that already exists, the open() will fail. Instead the file must be deleted first and may then be created anew.

   
         
 
  Copyright © 2003-2008 eCosCentric Limited Privacy & Legal Statements