[ Index ] |
|
Code source de CakePHP 1.1.13.4450 |
[Code source] [Imprimer] [Statistiques]
Convenience class for handling directories. PHP versions 4 and 5
Copyright: | Copyright 2005-2007, Cake Software Foundation, Inc. |
License: | http://www.opensource.org/licenses/mit-license.php The MIT License |
Version: | $Revision: 4409 $ |
Poids: | 328 lignes (8 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
Folder:: (17 méthodes):
__construct()
pwd()
cd()
ls()
find()
findRecursive()
_findRecursive()
isWindowsPath()
isAbsolute()
isSlashTerm()
correctSlashFor()
slashTerm()
addPathElement()
inCakePath()
inPath()
mkdirr()
dirsize()
__construct($path = false, $create = false, $mode = false) X-Ref |
Constructor. param: string $path param: boolean $path |
pwd() X-Ref |
Return current path. return: string Current path |
cd($desiredPath) X-Ref |
Change directory to $desired_path. param: string $desired_path Path to the directory to change to return: string The new path. Returns false on failure |
ls($sort = true, $noDotFiles = false) X-Ref |
Returns an array of the contents of the current directory, or false on failure. The returned array holds two arrays: one of dirs and one of files. param: boolean $sort param: boolean $noDotFiles return: array |
find($regexp_pattern = '.*') X-Ref |
Returns an array of all matching files in current directory. param: string $pattern Preg_match pattern (Defaults to: .*) return: array |
findRecursive($pattern = '.*') X-Ref |
Returns an array of all matching files in and below current directory. param: string $pattern Preg_match pattern (Defaults to: .*) return: array Files matching $pattern |
_findRecursive($pattern) X-Ref |
Private helper function for findRecursive. param: string $pattern return: array Files matching pattern |
isWindowsPath($path) X-Ref |
Returns true if given $path is a Windows path. param: string $path Path to check return: boolean |
isAbsolute($path) X-Ref |
Returns true if given $path is an absolute path. param: string $path Path to check return: boolean |
isSlashTerm($path) X-Ref |
Returns true if given $path ends in a slash (i.e. is slash-terminated). param: string $path Path to check return: boolean |
correctSlashFor($path) X-Ref |
Returns a correct set of slashes for given $path. (\\ for Windows paths and / for other paths.) param: string $path Path to check return: string Set of slashes ("\\" or "/") |
slashTerm($path) X-Ref |
Returns $path with added terminating slash (corrected for Windows or other OS). param: string $path Path to check return: string |
addPathElement($path, $element) X-Ref |
Returns $path with $element added, with correct slash in-between. param: string $path param: string $element return: string |
inCakePath($path = '') X-Ref |
Returns true if the File is in a given CakePath. return: boolean |
inPath($path = '') X-Ref |
Returns true if the File is in given path. return: boolean |
mkdirr($pathname, $mode = null) X-Ref |
Create a directory structure recursively. param: string $pathname The directory structure to create return: bool Returns TRUE on success, FALSE on failure |
dirsize() X-Ref |
Returns the size in bytes of this Folder. param: string $directory Path to directory |
Généré le : Sun Feb 25 19:27:47 2007 | par Balluche grâce à PHPXref 0.7 |