Location: PHPKode > scripts > Dir Tool > dir-tool/cirtool-doc.txt
<?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() 




?>
Return current item: Dir Tool