[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
[Code source] [Imprimer] [Statistiques]
This file implements various File handling functions. This file is part of the evoCore framework - {@link http://evocore.net/} See also {@link http://sourceforge.net/projects/evocms/}.
Author: | blueyed: Daniel HAHLER. |
Author: | fplanque: Francois PLANQUE. |
Copyright: | (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/} |
Version: | $Id: _file.funcs.php,v 1.3 2007/11/01 04:31:25 fplanque Exp $ |
Poids: | 877 lignes (23 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
bytesreadable( $bytes ) X-Ref |
Converts bytes to readable bytes/kb/mb/gb, like "12.45mb" param: integer bytes return: string bytes made readable |
get_filenames( $path, $inc_files = true, $inc_dirs = true, $flat = true, $recurse = true, $basename = false ) X-Ref |
Get an array of all directories (and optionally files) of a given directory, either flat (one-dimensional array) or multi-dimensional (then dirs are the keys and hold subdirs/files). Note: there is no ending slash on dir names returned. param: string the path to start param: boolean include files (not only directories) param: boolean include directories (not the directory itself!) param: boolean flat (return an one-dimension-array) param: boolean Recurse into subdirectories? param: boolean Get the basename only. return: false|array false if the first directory could not be accessed, |
get_admin_skins() X-Ref |
Get a list of available admin skins. This checks if there's a _adminUI.class.php in there. return: array List of directory names that hold admin skins or false, if the admin skins driectory does not exist. |
fnmatch($pattern, $string) X-Ref |
A replacement for fnmatch() which needs PHP 4.3 and a POSIX compliant system (Windows is not). author: jk at ricochetsolutions dot com {@link http://php.net/manual/function.fnmatch.php#71725} |
get_dirsize_recursive( $path ) X-Ref |
Get size of a directory, including anything (especially subdirs) in there. param: string the dir's full path |
rmdir_r( $path ) X-Ref |
Deletes a dir recursively, wiping out all subdirectories!! param: string the dir |
imgsize( $path, $param = 'widthheight' ) X-Ref |
Get the size of an image file param: string absolute file path param: string what property/format to get: 'width', 'height', 'widthxheight', return: mixed false if no image, otherwise what was requested through $param |
trailing_slash( $path ) X-Ref |
Add a trailing slash, if none present param: string the path/url return: string the path/url with trailing slash |
no_trailing_slash( $path ) X-Ref |
Remove trailing slash, if present param: string the path/url return: string the path/url without trailing slash |
get_canonical_path( $ads_path ) X-Ref |
Returns canonicalized pathname of a directory + ending slash param: string absolute path to be reduced ending with slash return: string absolute reduced path, slash terminated or NULL if the path doesn't exist |
check_canonical_path( $path ) X-Ref |
Returns canonicalized absolute pathname as with realpath(), except it will also translate paths that don't exist on the system. param: string the path to be translated return: array [0] = the translated path (with trailing slash); [1] = TRUE|FALSE (path exists?) |
validate_filename( $filename, $allow_locked_filetypes = false ) X-Ref |
Check for valid filename and extension of the filename (no path allowed). (MB) param: string filename to test param: boolean return: nothing if the filename is valid according to the regular expression and the extension too, error message if not |
validate_dirname( $dirname ) X-Ref |
Check for valid dirname (no path allowed). ( MB ) param: string dirname to test return: nothing if the dirname is valid according to the regular expression, error message if not |
rel_path_to_base( $path ) X-Ref |
Return the path without the leading {@link $basepath}, or if not below {@link $basepath}, just the basename of it. Do not use this for file handling. but "just" displaying! param: string Path return: string Relative path or even base name. |
get_directory_tree( $Root = NULL, $ads_full_path = NULL, $ads_selected_full_path = NULL, $radios = false, $rds_rel_path = NULL, $is_recursing = false ) X-Ref |
Get the directories of the supplied path as a radio button tree. param: FileRoot A single root or NULL for all available. param: string the root path to use param: boolean add radio buttons ? param: string used by recursion return: string |
mkdir_r( $dirName, $chmod = NULL ) X-Ref |
Create a directory recursively. NOTE: this can be done with the "recursive" param in PHP5 param: string directory name param: integer permissions return: boolean |
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |