fs
ARES System Manual: fs Driver
The
ARES fs syntax:
ARES storage frontend syntax:
The ARES
The functions of
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:
The current implementation is ported from
For example,
Spec patterns may contain any number of asterisks, question marks, and character classes. Character classes cannot contain
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
Views may also specify the name of a menu (as
The
_fs program contains two separate sets of functionality: utilities for browsing the filesystem and support functions for the storage daemon.
ARES fs syntax:
fs help: displays a summary of options
fs <view>: list view contents
fs <source>: list source 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 design. The 'phase' file system was moved into _phase in 0.5.6.
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.