Directories of Resources:
A ‘resource directory’ is an on-disk directory which is registered as a resource using the <resourceDirectory> ZCML directive. The directory is treated as a source for individual resources; it can be traversed to retrieve resources represented by contained files, which can in turn be treated as resources. The contained files have __name__ values which include a ‘/’ separating the __name__ of the resource directory from the name of the file within the directory.
A resource representing an entire directory.
It is traversable to the items contained within the directory. See
The resource factory to use for directories.
forbidden_names= ('.svn', '.git')¶
A sequence of name patterns usable with
fnmatch.fnmatch. Traversing to files that match these names will not produce resources.
getto traverse to the name.
Returns an empty callable and tuple.
get(name, default=<object object>)¶
Locate name on the filesystem and return a
If the name cannot be found and no default is given, then raise
If the name matches one of the
forbidden patternsthen returns the default (if given) or raise
NotFound(when not given).
When the name refers to a file, we
IResourceFactoryFactoryutility named for the file’s extension (e.g.,
css) and use it to produce a resource. If no such utility can be found, we use
When the name refers to a directory, we use
our directory factory.