| @@ 200-210 (lines=11) @@ | ||
| 197 | case 'c': |
|
| 198 | case 'c+': |
|
| 199 | //emulate these |
|
| 200 | if ($useExisting and $this->file_exists($path)) { |
|
| 201 | if (!$this->isUpdatable($path)) { |
|
| 202 | return false; |
|
| 203 | } |
|
| 204 | $tmpFile = $this->getCachedFile($path); |
|
| 205 | } else { |
|
| 206 | if (!$this->isCreatable(dirname($path))) { |
|
| 207 | return false; |
|
| 208 | } |
|
| 209 | $tmpFile = \OC::$server->getTempManager()->getTemporaryFile(); |
|
| 210 | } |
|
| 211 | $source = fopen($tmpFile, $mode); |
|
| 212 | return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath) { |
|
| 213 | $this->flysystem->putStream($fullPath, fopen($tmpFile, 'r')); |
|
| @@ 383-393 (lines=11) @@ | ||
| 380 | } else { |
|
| 381 | $ext = ''; |
|
| 382 | } |
|
| 383 | if ($this->file_exists($path)) { |
|
| 384 | if (!$this->isUpdatable($path)) { |
|
| 385 | return false; |
|
| 386 | } |
|
| 387 | $tmpFile = $this->getCachedFile($path); |
|
| 388 | } else { |
|
| 389 | if (!$this->isCreatable(dirname($path))) { |
|
| 390 | return false; |
|
| 391 | } |
|
| 392 | $tmpFile = \OC::$server->getTempManager()->getTemporaryFile($ext); |
|
| 393 | } |
|
| 394 | $source = fopen($tmpFile, $mode); |
|
| 395 | $share = $this->share; |
|
| 396 | return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath, $share) { |
|