示例#1
0
 function FileUpadter()
 {
     FileSystemObject::setRoot(dirname(__FILE__));
     $d = new Dir('files');
     $fu = new FileUpdater($d->getDir('source/includes'), $d->getDir('target/includes'), $d->getDir('backup/includes'));
     $command = ArgsHolder::get()->shiftCommand();
     if ($command == 'cdo') {
         $fu->copyDo();
     } elseif ($command == 'cundo') {
         $fu->copyUndo();
     } elseif ($command == 'undo') {
         $fu->undo();
     } elseif ($command == 'do') {
         $fu->run();
     } else {
         io::out('command not found');
     }
 }