Home  Contents

filer.new

Filer Core4 Lua Commands

SYNOPSIS

f = filer.new()

DESCRIPTION

Returns a new filer instance. A filer is in fact a Lua table, and it is initialized by assigning values to table fields.

Assuming f is a filer instance, the following fields are understood by the filer code:

f.path The search path used for looking up a file. This must be a table organized as a list of strings.
f.shortcuts Optionally, a list of shortcut names for each entry in f.path. This must be a table organized as a list of strings with exactly the same number of entries as f.path. Shortcuts allow drive letter like paths. If there is a shortcut named xyz, then the filer automatically adjusts any filename that begins with xyz:/ to the corresponding entry in the f.path list.
f.subdir An optional sub-directory. If given, this value is implicitly appended to each component from f.path before any checks are made.
f.subdir An optional language name. This is the default language sub-directory used when no language is passed to filer:lookup(). When nil, no language sub-directory is used by default.

RETURN VALUE

A filer instance handle.

EXAMPLE

Please see the introduction page for an example.

SEE ALSO