fs
ARES System Manual: fs Driver

The _fs program contains three separate sets of functionality: the 'phase' filesystem (see sources), utilities for browsing the filesystem, and support functions for the storage daemon.

phase filesystem syntax:
    fs help: displays a summary of options
    fs scan: check for changes
    fs label <new label>: change volume label
    fs connect <mode> <system> <handle>: offer connection as storage to remote host <system>

ARES fs syntax:
    fs <view>: list view contents
    fs match <pattern>: glob files matching <pattern>
    fs open <filename>: attempt to open with file association

ARES storage frontend syntax:
    fs delete|rm|remove <filename>: remove a file
    fs append|write|read|stat <filename>: perform standard file operations
    fs mount <source> <address> <path> <filesystem> <options>: attempt to mount a filesystem
    fs rebuild|unmount <source>: filesystem maintenance functions

The ARES _fs program was reimplemented in 0.4.4 as part of the storage daemon.

The functions of fs were managed by songbird in Companion.


Filename Patterns

A pattern is a simple filename-matching pattern based on a restricted syntax similar to regular expressions. They are also known as globs, after an old slang term for the asterisk character.

ARES globs use the following alphabet:

*: zero or more characters of any type
?: exactly one character of any type
[<class>]: exactly one character from the class <class>, e.g. [abc] to match a single a, b, or c
[!<class>]: exactly one character *not* from the class <class>

The current implementation is ported from lib/glob.c in the Linux kernel.

For example, p_*_1 finds all filenames that start with p_ and end in _1, while *.[la]s finds all files with the extensions .ls and .as.

Spec patterns may contain any number of asterisks, question marks, and character classes. Character classes cannot contain - as in regular expressions.

Vertical bars to separate multiple patterns are no longer supported.


Sources

ARES doesn't just read notecards from its own inventory: it indexes accessible text files from multiple scripts and websites and collects them into a single list for your use. The scripts and websites that provide these files are called sources, and to ARES, they are the equivalent of a hard drive or CD-ROM. For information on creating and managing file sources, see the help entry sources.


Views

Views create a list of files based on a particular filename search pattern. For example, the persona view's spec is *.p. The persona program consults this view to determine what personas are available.

Views may also specify the name of a menu (as LSD:fs.view.<view>.menu), which fs will populate with the view's output. These menu entries require a file association in LSD:fs.open. The standard persona view demonstrates this, also.