Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
 /**
  * @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');
 }