| @@ 1260-1269 (lines=10) @@ | ||
| 1257 | * @return bool |
|
| 1258 | * @author Dmitry (dio) Levashov |
|
| 1259 | **/ |
|
| 1260 | protected function _copy($source, $targetDir, $name) { |
|
| 1261 | $path = $this->_normpath($targetDir.'/'.$name); |
|
| 1262 | try { |
|
| 1263 | $this->dropbox->copy($source, $path); |
|
| 1264 | } catch (Dropbox_Exception $e) { |
|
| 1265 | return $this->setError('Dropbox error: '.$e->getMessage()); |
|
| 1266 | } |
|
| 1267 | $this->deltaCheck(); |
|
| 1268 | return true; |
|
| 1269 | } |
|
| 1270 | ||
| 1271 | /** |
|
| 1272 | * Move file into another parent dir. |
|
| @@ 1281-1290 (lines=10) @@ | ||
| 1278 | * @return string|bool |
|
| 1279 | * @author Dmitry (dio) Levashov |
|
| 1280 | **/ |
|
| 1281 | protected function _move($source, $targetDir, $name) { |
|
| 1282 | $target = $this->_normpath($targetDir.'/'.$name); |
|
| 1283 | try { |
|
| 1284 | $this->dropbox->move($source, $target); |
|
| 1285 | } catch (Dropbox_Exception $e) { |
|
| 1286 | return $this->setError('Dropbox error: '.$e->getMessage()); |
|
| 1287 | } |
|
| 1288 | $this->deltaCheck(); |
|
| 1289 | return $target; |
|
| 1290 | } |
|
| 1291 | ||
| 1292 | /** |
|
| 1293 | * Remove file |
|