| @@ 1254-1263 (lines=10) @@ | ||
| 1251 | * @return bool |
|
| 1252 | * @author Dmitry (dio) Levashov |
|
| 1253 | **/ |
|
| 1254 | protected function _copy($source, $targetDir, $name) { |
|
| 1255 | $path = $this->_normpath($targetDir.'/'.$name); |
|
| 1256 | try { |
|
| 1257 | $this->dropbox->copy($source, $path); |
|
| 1258 | } catch (Dropbox_Exception $e) { |
|
| 1259 | return $this->setError('Dropbox error: '.$e->getMessage()); |
|
| 1260 | } |
|
| 1261 | $this->deltaCheck(); |
|
| 1262 | return true; |
|
| 1263 | } |
|
| 1264 | ||
| 1265 | /** |
|
| 1266 | * Move file into another parent dir. |
|
| @@ 1275-1284 (lines=10) @@ | ||
| 1272 | * @return string|bool |
|
| 1273 | * @author Dmitry (dio) Levashov |
|
| 1274 | **/ |
|
| 1275 | protected function _move($source, $targetDir, $name) { |
|
| 1276 | $target = $this->_normpath($targetDir.'/'.$name); |
|
| 1277 | try { |
|
| 1278 | $this->dropbox->move($source, $target); |
|
| 1279 | } catch (Dropbox_Exception $e) { |
|
| 1280 | return $this->setError('Dropbox error: '.$e->getMessage()); |
|
| 1281 | } |
|
| 1282 | $this->deltaCheck(); |
|
| 1283 | return $target; |
|
| 1284 | } |
|
| 1285 | ||
| 1286 | /** |
|
| 1287 | * Remove file |
|