| @@ 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')); |
|
| @@ 397-407 (lines=11) @@ | ||
| 394 | } else { |
|
| 395 | $ext = ''; |
|
| 396 | } |
|
| 397 | if ($this->file_exists($path)) { |
|
| 398 | if (!$this->isUpdatable($path)) { |
|
| 399 | return false; |
|
| 400 | } |
|
| 401 | $tmpFile = $this->getCachedFile($path); |
|
| 402 | } else { |
|
| 403 | if (!$this->isCreatable(dirname($path))) { |
|
| 404 | return false; |
|
| 405 | } |
|
| 406 | $tmpFile = \OC::$server->getTempManager()->getTemporaryFile($ext); |
|
| 407 | } |
|
| 408 | $source = fopen($tmpFile, $mode); |
|
| 409 | $share = $this->share; |
|
| 410 | return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath, $share) { |
|