Template::Direct::Directory - Controls the access to a set directory
use Directory; my $directory = Template::Direct::Directory->new( '/etc' ); my $file = $directory->open( 'foo.txt' ); my $parent = $directory->parent(); my @children = $directory->list(); my @results = $directory->search();
Loads a directory for use with fileDirectives
Create a new Directory object located at $dir.
Save a file in this directory (quickly)
Load a file object child, options include: * Create - Create this file if it doesn't exist
Load a sub directory, options include: * Create - Create this file if it doesn't exist
Generic load a file or sub directory object with options: * Create - Create this filename as a directory if it doesn't exist * CreateFile - Create this filename as a file if it doesn't exist * File - Force loading as a file object.
Delete a file from this directory.
Takes %p and returns corrected, localised paths.
Clear directory and file objects that are cached.
Clear all directory and file objects that are cached.
Was this object loaded from cache (for testing)
Save a cache for filename with data.
Load a specific cache at filename if it exists.
Returns this directories full path.
Returns this folders name.
Create a directory and all parents from this directory.
Removes all empty directories from path to this directory.
Should parts of the path or filename be replaced by a defined hash? (used by load, save, delete)
Does this directory or child exist.
Return a new directory object containing the parent directory.
List all directories and files in this directory, load each as an object.
Return a clean list of filename children.
Compare directory location string.
Compare directory location string does not equal.
Return path of this directory in string context.
Does this directory exist when used in a boolean context.
Copyright, Martin Owens 2008, AGPL