public function move($to)
{
if (!dir::move($this->root, $to)) {
return false;
} else {
$this->root = true;
return true;
}
}
/** * 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); } }