The special symbol DIRECTORY
is used to dynamically compute directory entries.
This should be a function that accepts (
fs, path, name)
.
It will be invoked when a requested directory is not found.
fs: The AFileSystem object
path: The full requested path
name: The name of the requested directory, in its parent.
The function should return an object describing the directory heirarchy that should reside under this name. The returned structure can include its own DIRECTORY and FILE entries to further auto-create levels of directory and their files.
null
should be returned to decline creating a directory of the given name.
The special symbol FILE is used to dynamically compute file entries in a directory.
These should be a function that accepts (
fs, path, name, version)
.
It will be invoked when a requested file is not found.
-1
in the case where no version is supplied.The result should be an array with at least one version, including the requested one. The helper fileVersion can be use to make this simpler, taking the version name and the file. The rest argument will be an empty array.
Return null
to decline to create a file of the given name or version.
Generated using TypeDoc
Symbols for attaching special data to files and directories.