[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
[Code source] [Imprimer] [Statistiques]
This file implements the Filelist class. 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: _filelist.class.php,v 1.1 2007/06/25 10:59:55 fplanque Exp $ |
Poids: | 1275 lignes (31 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
Filelist:: (30 méthodes):
Filelist()
load()
add()
update_caches()
add_by_subpath()
sort()
_sort_callback()
get_sort_order()
get_sort_link()
restart()
is_sorting_asc()
set_filter()
is_filtering()
contains()
get_filter()
is_filter_regexp()
count()
count_dirs()
count_files()
count_bytes()
get_root_type()
get_root_ID()
get_ads_list_path()
get_rds_list_path()
rdfs_relto_root_from_adfs()
remove()
get_array()
md5_checksum()
load_meta()
get_cwd_clickable()
Filelist( $FileRoot, $path = NULL ) X-Ref |
Constructor param: FileRoot See FileRootCache::get_by_type_and_ID() param: boolean|string Default path for the files, false if you want to create an arbitrary list; NULL for the Fileroot's ads_path. param: integer ID of the user, the group or the collection the file belongs to... |
load() X-Ref |
Loads or reloads the filelist entries. NOTE: this does not work for arbitrary lists! return: boolean True on sucess, false on failure (not accessible) |
add( & $File, $mustExist = false ) X-Ref |
Add a File object to the list (by reference). param: File File object (by reference) param: boolean Has the file to exist to get added? return: boolean true on success, false on failure |
update_caches() X-Ref |
Update the name dependent caches This is especially useful after a name change of one of the files in the list |
add_by_subpath( $rel_path, $mustExist = false ) X-Ref |
Add a file to the list, by filename. This is a stub for {@link Filelist::add()}. param: string Subpath for this file/folder, relative the associated root, including trailing slash (if directory) param: boolean Has the file to exist to get added? return: boolean true on success, false on failure (path not allowed, |
sort( $order = NULL, $orderasc = NULL, $dirsattop = NULL ) X-Ref |
Sort the entries by sorting the internal {@link $_order_index} array. param: string The order to use ('name', 'type', 'lastmod', .. ) param: boolean Ascending (true) or descending param: boolean Sort directories at top? |
_sort_callback( $a, $b ) X-Ref |
usort callback function for {@link Filelist::sort()} return: integer |
get_sort_order() X-Ref |
Get the used order. return: string |
get_sort_link( $type, $atext ) X-Ref |
Get the link to sort by a column. Handle current order and appends an icon to reflect the current state (ascending/descending), if the column is the same we're sorting by. param: string The type (name, path, size, ..) param: string The text for the anchor. return: string |
restart() X-Ref |
Reset the iterator |
is_sorting_asc( $col = '' ) X-Ref |
Are we sorting ascending? param: string The type (empty for current order type) return: integer 1 for ascending sorting, 0 for descending |
set_filter( $filter_string, $filter_is_regexp ) X-Ref |
Set the filter. param: string Filter string (for regular expressions, if no delimiter/modifiers are included, we try magically adding them) param: boolean Is the filter a regular expression? (it's a glob pattern otherwise) |
is_filtering() X-Ref |
Is a filter active? return: boolean |
contains( & $File ) X-Ref |
Does the list contain a specific File? param: File the File object to look for return: boolean |
get_filter( $verbose = true ) X-Ref |
Return the current filter param: boolean add a note when it's a regexp or no filter? return: string the filter |
is_filter_regexp() X-Ref |
Is the current Filter a regexp? return: NULL|boolean true if regexp, NULL if no filter set |
count() X-Ref |
Get the total number of entries in the list. return: integer |
count_dirs() X-Ref |
Get the total number of directories in the list return: integer |
count_files() X-Ref |
Get the total number of files in the list return: integer |
count_bytes() X-Ref |
Get the total number of bytes of all files in the list return: integer |
get_root_type() X-Ref |
Pas de description |
get_root_ID() X-Ref |
Get the FileLists root ID (in_type_ID). return: FileRoot |
get_ads_list_path() X-Ref |
Get absolute path to list. |
get_rds_list_path() X-Ref |
Get path to list relative to root. |
rdfs_relto_root_from_adfs( $adfs_path ) X-Ref |
Get the path (and name) of a {@link File} relative to the {@link Filelist::$_FileRoot::$ads_path}. param: string return: string |
remove( & $File ) X-Ref |
Removes a {@link File} from the entries list. This handles indexes and number of total entries, bytes, files/dirs. return: boolean true on success, false if not found in list. |
get_array( $method = NULL ) X-Ref |
Get the list of File entries. You can use a method on each object to get this as result instead of the object itself. param: string Use this method on every File and put the result into the list. return: array The array with the File objects or method results |
md5_checksum() X-Ref |
Get a MD5 checksum over the entries. Used to identify a unique filelist. return: string md5 hash |
load_meta() X-Ref |
Attempt to load meta data for all files in the list. Will attempt only once per file and cache the result. |
get_cwd_clickable( $clickableOnly = true ) X-Ref |
Returns cwd, where the accessible directories (below root) are clickable return: string cwd as clickable html |
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |