Options
All
  • Public
  • Public/Protected
  • All
Menu

Symbols for attaching special data to files and directories.

Index

Variables

Const CACHED_METADATA

CACHED_METADATA: typeof CACHED_METADATA = ...

Const DIRECTORY

DIRECTORY: typeof DIRECTORY = ...

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.

see

FILE

Const FILE

FILE: typeof FILE = ...

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.

  • fs: The AFileSystem object
  • path: The full requested path
  • name: The name of the requested file, in this directory
  • version: The requested version. This will be -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.

see

DIRECTORY

Const METADATA

METADATA: typeof METADATA = ...

Const TAGS

TAGS: typeof TAGS = ...

Generated using TypeDoc