| @@ 290-295 (lines=6) @@ | ||
| 287 | case 'w': |
|
| 288 | case 'wb': |
|
| 289 | case 'w+': |
|
| 290 | case 'wb+': |
|
| 291 | $tmpFile = \OC::$server->getTempManager()->getTemporaryFile($ext); |
|
| 292 | $handle = fopen($tmpFile, $mode); |
|
| 293 | return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { |
|
| 294 | $this->writeBack($tmpFile, $path); |
|
| 295 | }); |
|
| 296 | case 'a': |
|
| 297 | case 'ab': |
|
| 298 | case 'r+': |
|
| @@ 414-420 (lines=7) @@ | ||
| 411 | return false; |
|
| 412 | } |
|
| 413 | case 'w': |
|
| 414 | case 'wb': |
|
| 415 | $tmpFile = \OC::$server->getTempManager()->getTemporaryFile(); |
|
| 416 | ||
| 417 | $handle = fopen($tmpFile, 'w'); |
|
| 418 | return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { |
|
| 419 | $this->writeBack($tmpFile, $path); |
|
| 420 | }); |
|
| 421 | case 'a': |
|
| 422 | case 'ab': |
|
| 423 | case 'r+': |
|