HTMLPurifier 4.4.0
FSTools Class Reference

Filesystem tools not provided by default; can recursively create, copy and delete folders. More...

List of all members.

Public Member Functions

 mkdirr ($folder)
 Recursively creates a directory.
 copyr ($source, $dest)
 Copy a file, or recursively copy a folder and its contents; modified so that copied files, if PHP, have includes removed.
 copyable ($file)
 Overloadable function that tests a filename for copyability.
 rmdirr ($dirname)
 Delete a file, or a folder and its contents.
 globr ($dir, $pattern, $flags=NULL)
 Recursively globs a directory.
 __call ($name, $args)
 Allows for PHP functions to be called and be stubbed.

Static Public Member Functions

static singleton ()
 Returns a global instance of FSTools.
static setSingleton ($singleton)
 Sets our global singleton to something else; useful for overloading functions.

Static Private Attributes

static $singleton

Detailed Description

Filesystem tools not provided by default; can recursively create, copy and delete folders.

Some template methods are provided for extensibility.

Note:
This class must be instantiated to be used, although it does not maintain state.

Definition at line 10 of file FSTools.php.


Member Function Documentation

FSTools::__call ( name,
args 
)

Allows for PHP functions to be called and be stubbed.

Warning:
This function will not work for functions that need to pass references; manually define a stub function for those.

Definition at line 151 of file FSTools.php.

FSTools::copyable ( file)

Overloadable function that tests a filename for copyability.

By default, everything should be copied; you can restrict things to ignore hidden files, unreadable files, etc. This function applies to copyr().

Definition at line 95 of file FSTools.php.

Referenced by copyr().

FSTools::copyr ( source,
dest 
)

Copy a file, or recursively copy a folder and its contents; modified so that copied files, if PHP, have includes removed.

Note:
Adapted from http://aidanlister.com/repos/v/function.copyr.php

Definition at line 60 of file FSTools.php.

References copyable().

FSTools::globr ( dir,
pattern,
flags = NULL 
)

Recursively globs a directory.

Definition at line 134 of file FSTools.php.

FSTools::mkdirr ( folder)

Recursively creates a directory.

Parameters:
string$folderName of folder to create
Note:
Adapted from the PHP manual comment 76612

Definition at line 36 of file FSTools.php.

FSTools::rmdirr ( dirname)

Delete a file, or a folder and its contents.

Note:
Adapted from http://aidanlister.com/repos/v/function.rmdirr.php

Definition at line 103 of file FSTools.php.

static FSTools::setSingleton ( singleton) [static]

Sets our global singleton to something else; useful for overloading functions.

Definition at line 27 of file FSTools.php.

References $singleton.

static FSTools::singleton ( ) [static]

Returns a global instance of FSTools.

Definition at line 18 of file FSTools.php.

References $singleton.

Referenced by FSTools_File::__construct().


Member Data Documentation

FSTools::$singleton [static, private]

Definition at line 13 of file FSTools.php.

Referenced by setSingleton(), and singleton().


The documentation for this class was generated from the following file: