PHP Classes

File: cirtool-doc.txt

Recommend this page to a friend!
  Classes of Uwe Stein   Dir Tool   cirtool-doc.txt   Download  
File: cirtool-doc.txt
Role: Documentation
Content type: text/plain
Description: Documentation of dirtool
Class: Dir Tool
Copy, move and delete directories trees and files
Author: By
Last change: deleted some unnessecary code-fragments and fixed a typing-mistake at the filename
Date: 18 years ago
Size: 1,892 bytes
 

Contents

Class file image Download
<?php class dirtool { var $path; var $from; var $to; var $aContent= array(); var $debug = FALSE; /* * Constructor, * Param: String Path of the dir to create the dir-object */ function dirtool($path) { /* * moves ( first copies, then deletes the content of the current dir-object) to a new location * param: string with the destination-path of the directory, * the path must be a valid existing path including the name of the directory * the directory name may different to the existing name, so the dir can have a new name * at the new location * return: void */ function move($newLocation) /* * copies the complete tree including all files * param: $path = the path where to copy the tree ( incudes the tree and the dir-name, see move) * $mode = the permissions of the dir-copy * $from is only for private use in recursivly callings */ function copy($path, $mode, $from = "") /* * deletes the complete tree of the current dir-object */ function delete() /* call debug to display all actions of the dir-object * param: $bool TRUE|FALSE to see all actions of the dir-object */ function debug($bool=TRUE) /* private func, used by copy and move*/ function copy_tree($path, $mode, $from = "") /* private func, used by copy and move*/ function copy_files ($path, $mode, $from = "") /* private func, used by delete*/ // deletes all dirs and subdirs --> assumes that there are no files in the tree function delete_tree() /* private func, used by delete deletes all files in the complete tree */ function delete_files() ?>