Folder::move PHP Method

move() public method

Moves the directory to a new location
public move ( string $to ) : boolean
$to string
return boolean
    public function move($to)
    {
        if (!dir::move($this->root, $to)) {
            return false;
        } else {
            $this->root = true;
            return true;
        }
    }

Usage Example

コード例 #1
0
ファイル: FileManager.php プロジェクト: saydulk/croogo
 /**
  * Rename $oldPath to $newPath
  *
  * @param string $oldPath Old filename/directory
  * @param string $newPath New filename/directory
  * @return bool True if rename was successful
  */
 public function rename($oldPath, $newPath)
 {
     if (is_dir($oldPath)) {
         $Folder = new Folder($oldPath);
         return $Folder->move(array('from' => $oldPath, 'to' => $newPath));
     } else {
         return rename($oldPath, $newPath);
     }
 }
All Usage Examples Of Folder::move