Ejemplo n.º 1
0
 /**
  * Copy a file.
  *
  * @param string $path
  * @param string $newpath
  *
  * @return bool
  */
 public function copy($path, $newpath)
 {
     $path = Util::normalizePath($path);
     $newpath = Util::normalizePath($newpath);
     $this->assertPresent($path);
     $this->assertAbsent($newpath);
     if ($this->adapter->copy($path, $newpath) === false) {
         return false;
     }
     $this->cache->copy($path, $newpath);
     return true;
 }