| @@ 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')); |
|
| @@ 366-376 (lines=11) @@ | ||
| 363 | } else { |
|
| 364 | $ext = ''; |
|
| 365 | } |
|
| 366 | if ($this->file_exists($path)) { |
|
| 367 | if (!$this->isUpdatable($path)) { |
|
| 368 | return false; |
|
| 369 | } |
|
| 370 | $tmpFile = $this->getCachedFile($path); |
|
| 371 | } else { |
|
| 372 | if (!$this->isCreatable(dirname($path))) { |
|
| 373 | return false; |
|
| 374 | } |
|
| 375 | $tmpFile = \OC::$server->getTempManager()->getTemporaryFile($ext); |
|
| 376 | } |
|
| 377 | $source = fopen($tmpFile, $mode); |
|
| 378 | $share = $this->share; |
|
| 379 | return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath, $share) { |
|