/** * Rename a file or directory. * * @param string $path * @param string $newPath * @return bool */ public function rename($path, $newPath) { $from = $this->applyPathPrefix($path); $to = $this->applyPathPrefix($newPath); $this->share->rename($from, $to); return true; }
/** * @expectedException \Icewind\SMB\Exception\NotFoundException */ public function testRenameTargetNonExisting() { $txt = $this->getTextFile(); $this->share->put($txt, $this->root . '/foo.txt'); unlink($txt); $this->share->rename($this->root . '/foo.txt', $this->root . '/bar/foo.txt'); }