renameItem() публичный статический Метод

Rename files using the current Gollem session settings.
public static renameItem ( string $oldDir, string $old, string $newDir, $new )
$oldDir string Old directory name.
$old string Old file name.
$newDir string New directory name.
Пример #1
0
         try {
             Gollem::createFolder($old_dir, $vars->new_folder);
             $notification->push(_("New folder created: ") . $vars->new_folder, 'horde.success');
         } catch (Gollem_Exception $e) {
             $notification->push($e, 'horde.error');
         }
     }
     break;
 case 'rename_items':
     if ($edit_perms && isset($vars->new_names) && isset($vars->old_names)) {
         $new = explode('|', $vars->new_names);
         $old = explode('|', $vars->old_names);
         if (count($new) == count($old)) {
             for ($i = 0, $iMax = count($new); $i < $iMax; ++$i) {
                 try {
                     Gollem::renameItem($old_dir, $old[$i], $old_dir, $new[$i]);
                     $notification->push(sprintf(_("\"%s\" renamed to \"%s\""), $old[$i], $new[$i]), 'horde.success');
                 } catch (Gollem_Exception $e) {
                     $notification->push($e, 'horde.error');
                 }
             }
             Gollem::expireCache($old_dir);
         }
     }
     break;
 case 'chmod_modify':
 case 'delete_items':
     if ($delete_perms && is_array($vars->items) && count($vars->items)) {
         foreach ($vars->items as $item) {
             if ($vars->actionID == 'chmod_modify' && $vars->chmod) {
                 try {