22 Feb 2008 20:07:39 UTC
- Distribution: Template-Direct
- Module version: 3.02
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (39 / 7 / 1)
- KwaliteeBus factor: 0
- License: unknown
- Activity24 month
- Download (19.59KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionDOCTORMO Martin Owens
- $class->new( $dir )
- $dir->save( $filename, $data, %options )
- $dir->loadFile( $filename, %options )
- $dir->loadDir( $directory, %options )
- $dir->load( $path, %options )
- $dir->delete( $filename, %p )
- $dir->_clean_path( %p )
- $dir->clearCache( %p )
- $dir->fromCache( )
- $dir->saveCache( $filename, $data )
- $dir->loadCache( $filename )
- $dir->path( )
- $dir->name( )
- $dir->mkpath( $directory )
- $dir->prune( $path )
- <$class>->useElements( $path, $elements )
- $dir->exist( %p )
- <$dir>->parent( )
- $dir->list( %p )
- $dir->hlist( )
- $dir->isfile( )
- $dir->isdir( )
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
Module Install Instructions
To install Template::Direct, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Template::Direct
For more information on module installation, please visit the detailed CPAN module installation guide.