SUINEVERE   Sega Saturn Hacks and Homebrew

SATURN LINK : MIDGAARD   CMFS
Guides » Running the world » Archon help » C » CMFS
CMFS
CoffeeMud File System
The CoffeeMud File System is a means of accessing files inside your main CoffeeMud folder along side files stored in your CoffeeMud database.  Files in the CMFS can be stored either in the local file system, in CoffeeMud's database, or in both.  The CMFS sees both sets of files and folders/directories as if they were part of a single file system.

Normally, the files required for operation of CoffeeMud, such as text files, class files, help files, images, and other files, are loaded from the appropriate directories on your LOCAL file system inside the main CoffeeMud folder.  If you installed CoffeeMud into D:\games\engines\coff, for instance, the file intro.txt (the intro screen) would be loaded from D:\games\engines\coff\ resources\text\intro.txt. 

Under the CoffeeMud system, however, you should always think of your CoffeeMud folder as a file system unto itself.  The same file discussed above, even when referring to the local file system inside CoffeeMud, would be accessed using the path:  resources/text/intro.txt. You'll notice that the path separators are forward slashes / like in UNIX, instead of the normal back-slashes \ used in DOS.  This is the standard for the CMFS.  You'll also notice that the resources directory is accessed as if it were at the root of its own drive.  This is also part of the CoffeeMud File System.  Because of this, CoffeeMud is utterly unable to access any files outside of its installation directory.  Keep this in mind!

Within this installation directory structure, CoffeeMud is able to store files both on your local file system drive, and in your database (VFS Files).  The VFS, or Virtual File System, refers specifically to files and folders which are saved in your database, and accessible through the MUDGrinder's File Browser, or the MUD's SHELL command (see HELP SHELL).  When the CoffeeMud directory structure is viewed through those two screens, files in the CoffeeMud database and files in the local file system are both viewable as if they were part of a single file system, the CMFS.

The files referenced in CoffeeMud are case-insensitive, except where dealing with the local file system, where it may be case-sensitive depending upon your operating system.  Any filename or path may be preceded by a :: string to denote forced VFS/database access, or // to denote forced local file-system access.  When neither is specified for a given file path, the VFS file is always preferred over the local one. For instance, the path ::resources/text/intro.txt would refer ONLY to a copy of the intro.txt file stored in the database as a VFS file. If that file is not in the database when the :: string is used, the file will not be found.  The path //resources/text/intro.txt would refer ONLY to the copy of the intro.txt file stored in the local file system, even if the same file appears in the VFS.  The path resources/text/intro.txt will use the copy of intro.txt stored in the VFS *if* it exists there, or the one on the local file system otherwise.

The / character is always used to separate directory paths and folders, such as /resources/text/intro.txt would refer to the file down.txt in the text folder, which in turn is in the resources folder, which in turn is located in the root directory.

So, as we've seen, whenever you need to refer to a file in CoffeeMud, you should keep this system in mind.  Files which are part of your CMFS may be in the VFS database, or in the local file system.  They may even be in both! This system provides security for the server in which CoffeeMud is being run, and provides for the ability to grant folder-level (or even VFS-folder-level) security to builders and other administrative users.
Also found asFILE SYSTEM, FS, LOCAL FILE
[guides] [handbook] [races] [classes] [world] [levels] [help] [search] [home] [play]