changePermissions() 공개 정적인 메소드

Change permissions on files using the current Gollem session settings.
public static changePermissions ( string $dir, string $name, string $permission )
$dir string The directory name.
$name string The filename to change permissions on.
$permission string The permission mode to set.
예제 #1
0
파일: manager.php 프로젝트: horde/horde
                     $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 {
                     Gollem::changePermissions(Gollem::$backend['dir'], $item, $vars->chmod);
                     Gollem::expireCache($old_dir);
                     $notification->push(_("Chmod done: ") . $item, 'horde.success');
                 } catch (Gollem_Exception $e) {
                     $notification->push(sprintf(_("Cannot chmod %s: %s"), $item, $e->getMessage()), 'horde.error');
                 }
             } elseif ($vars->actionID == 'delete_items') {
                 if ($gollem_vfs->isFolder($old_dir, $item)) {
                     try {
                         Gollem::deleteFolder($old_dir, $item);
                         Gollem::expireCache($old_dir);
                         $notification->push(_("Folder removed: ") . $item, 'horde.success');
                     } catch (Gollem_Exception $e) {
                         $notification->push(sprintf(_("Unable to delete folder %s: %s"), $item, $e->getMessage()), 'horde.error');
                     }
                 } else {