The specification of what directories and files to initialize the filesystem with
Optional options: readOnly and name
Preserve the class name across minification.
Add a new file at the specified path. If no version, or 'latest', adds a new version. Otherwise sets the specified version or label.
Path to store the file
The file, either an FileAttachment or an AFile.
the file
Copy file from to. If 'latest' or unspecified, copies only the latest.
Path to the existing file
Path to the destination
the file copied
Find the file at the given (possibly versioned) path.
the full pathname to the desired file
An AFileAwait
Label the version at the specified path with 'label'. A label selects a specific version of a file; it is not a property of a file version.
Path to the file
Label to add to the file
The file labeled.
Return the metadata for the requested path. Metadata can be associated with either a specific version, or the entire collection of versions at a path. The results are merged.
Path to the file
Promise yielding Metadata or null
if the file is not found.
Wait for the requested path. The return value is an async generator that yields when the requested path is available.
Path to the file
An async generator yielding a value for the file when it becomes available..
Wait for the requested path. The return value is an async generator that yields once for each value stored at path.
Path to the file
if true, null
will be returned by the generator whenever the file does not exist; by default it is filtered out.
An async generator yielding values for a file as it changes (new versions created/deleted).
Generated using TypeDoc
The
AFileSystem
constructor takes a single argument, which represents an initial filesystem content.Every Object (not subclasses, but literal objects) represent a directory, while every array holds the versions of a logical file.
Versions are specified on lookup by appending @version to the path. No version specified is the same as
@latest
, which obtains the highest numbered version (the last in the array). You can ignore named versions (labels), or even multiple versions, but files are always identified by being in an array.A file can be any value, but normally they will be either an FileAttachment or an AFile; they implement the same interface.
The actual file is not returned, but rather an AFileAwait. This is a proxy with the same methods, but the methods return
undefined
if the file specified is not found.