Oct 2007: Initial version
Kris
- class LinkedFolder : VirtualFolder ¶
-
LinkedFolder is derived from VirtualFolder, and behaves exactly the
same in all but one aspect: it treats mounted folders as an ordered
list of alternatives to look for a file. This supports the notion of
file 'overrides', whereby "customized" files can be inserted into a
chain of alternatives.
(overridden folders are not currently supported)
- this(const(char)[] name) ¶
-
All folder must have a name. No '.' or '/' chars are
permitted
- VfsHost mount(VfsFolder folder, const(char)[] name = null) [override, final] ¶
-
Add a child folder. The child cannot 'overlap' with others
in the tree of the same type. Circular references across a
tree of virtual folders are detected and trapped.
We add the new child at the end of an ordered list, which
we subsequently traverse when looking up a file
The second argument represents an optional name that the
mount should be known as, instead of the name exposed by
the provided folder (it is not an alias).
- VfsHost dismount(VfsFolder folder) [override, final] ¶
-
unhook a child folder.
- VfsFile file(const(char)[] path) [@property, override, final] ¶
-
Return a file representation of the given path. If the
path-head does not refer to an immediate child folder,
and does not match a symbolic link, it is considered to
be unknown.
We scan the set of mounted folders, in the order mounted,
looking for a match. Where one is found, we test to see
that it really exists before returning the reference