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.
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.
Creating a file with O_EXCL will always fail.
If an attempt is made to rename a file to a filename that already
exists, the rename() will fail, rather than
overwriting the destination file. This includes attempting to rename
the file to its own name. Instead the destination file must be
deleted first.