copy() public method

This method returns the file information of the newly created file.
public copy ( string $from, string $to, string $root = null ) : stdclass
$from string source path
$to string destination path
$root string Use this to override the default root path (sandbox/dropbox)
return stdclass
コード例 #1
0
 public function rename($path_from, $path_to)
 {
     $path1 = $this->initPath($path_from);
     $path2 = $this->initPath($path_to);
     self::$dropbox->copy($path1, $path2);
     self::$dropbox->delete($path1);
 }