[ Index ] |
|
Code source de Typo3 4.1.3 |
[Code source] [Imprimer] [Statistiques]
extending class to class t3lib_basicFileFunctions $Id: class.t3lib_extfilefunc.php 1706 2006-08-31 18:24:51Z baschny $ Revised for TYPO3 3.6 May/2004 by Kasper Skaarhoj
Author: | Kasper Skaarhoj <kasperYYYY@typo3.com> |
Poids: | 869 lignes (40 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
t3lib_extFileFunctions:: (15 méthodes):
start()
init_actionPerms()
processData()
printLogErrorMessages()
findRecycler()
writeLog()
func_delete()
func_copy()
func_move()
func_rename()
func_newfolder()
func_newfile()
func_edit()
func_upload()
func_unzip()
Classe: t3lib_extFileFunctions - X-Ref
Contains functions for performing file operations like copying, pasting, uploading, moving, deleting etc. through the TCEstart($fileCmds) X-Ref |
Initialization of the class param: array The $file array with the commands to execute. See "TYPO3 Core API" document return: void |
init_actionPerms($setup) X-Ref |
Sets up permission to perform file/directory operations. See below or the be_user-table for the significanse of the various bits in $setup ($BE_USER->user['fileoper_perms']) param: integer File permission integer from BE_USER object. return: void |
processData() X-Ref |
Processing the command array in $this->fileCmdMap return: void |
printLogErrorMessages($redirect='') X-Ref |
Print log error messages from the operations of this script instance param: string Redirect URL (for creating link in message) return: void (Will exit on error) |
findRecycler($theFile) X-Ref |
Goes back in the path and checks in each directory if a folder named $this->recyclerFN (usually '_recycler_') is present. If a folder in the tree happens to be a _recycler_-folder (which means that we're deleting something inside a _recycler_-folder) this is ignored param: string Takes a valid Path ($theFile) return: string Returns the path (without trailing slash) of the closest recycle-folder if found. Else false. |
writeLog($action,$error,$details_nr,$details,$data) X-Ref |
Logging file operations param: integer The action number. See the functions in the class for a hint. Eg. edit is '9', upload is '1' ... param: integer The severity: 0 = message, 1 = error, 2 = System Error, 3 = security notice (admin) param: integer This number is unique for every combination of $type and $action. This is the error-message number, which can later be used to translate error messages. param: string This is the default, raw error message in english param: array Array with special information that may go into $details by "%s" marks / sprintf() when the log is shown return: void |
func_delete($cmds) X-Ref |
Deleting files and folders (action=4) param: array $cmds['data'] is the file/folder to delete return: boolean Returns true upon success |
func_copy($cmds) X-Ref |
Copying files and folders (action=2) param: array $cmds['data'] is the file/folder to copy. $cmds['target'] is the path where to copy to. $cmds['altName'] (boolean): If set, another filename is found in case the target already exists return: string Returns the new filename upon success |
func_move($cmds) X-Ref |
Moving files and folders (action=3) param: array $cmds['data'] is the file/folder to move. $cmds['target'] is the path where to move to. $cmds['altName'] (boolean): If set, another filename is found in case the target already exists return: string Returns the new filename upon success |
func_rename($cmds) X-Ref |
Renaming files or foldes (action=5) param: array $cmds['data'] is the new name. $cmds['target'] is the target (file or dir). return: string Returns the new filename upon success |
func_newfolder($cmds) X-Ref |
This creates a new folder. (action=6) param: array $cmds['data'] is the foldername. $cmds['target'] is the path where to create it. return: string Returns the new foldername upon success |
func_newfile($cmds) X-Ref |
This creates a new file. (action=8) param: array $cmds['data'] is the new filename. $cmds['target'] is the path where to create it return: string Returns the new filename upon success |
func_edit($cmds) X-Ref |
Editing textfiles or folders (action=9) param: array $cmds['data'] is the new content. $cmds['target'] is the target (file or dir) return: boolean Returns true on success |
func_upload($cmds) X-Ref |
Upload of files (action=1) param: array $cmds['data'] is the ID-number (points to the global var that holds the filename-ref ($_FILES['upload_'.$id]['name']). $cmds['target'] is the target directory return: string Returns the new filename upon success |
func_unzip($cmds) X-Ref |
Unzipping file (action=7) This is permitted only if the user has fullAccess or if the file resides param: array $cmds['data'] is the zip-file. $cmds['target'] is the target directory. If not set we'll default to the same directory as the file is in. return: boolean Returns true on success |
Généré le : Sun Nov 25 17:13:16 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |