diff options
Diffstat (limited to 'lib/private/Files/Storage/LocalTempFileTrait.php')
-rw-r--r-- | lib/private/Files/Storage/LocalTempFileTrait.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/private/Files/Storage/LocalTempFileTrait.php b/lib/private/Files/Storage/LocalTempFileTrait.php index 26fbcc238fd..fffc3e789f3 100644 --- a/lib/private/Files/Storage/LocalTempFileTrait.php +++ b/lib/private/Files/Storage/LocalTempFileTrait.php @@ -7,6 +7,8 @@ */ namespace OC\Files\Storage; +use OCP\Files; + /** * Storage backend class for providing common filesystem operation methods * which are not storage-backend specific. @@ -29,10 +31,7 @@ trait LocalTempFileTrait { return $this->cachedFiles[$path]; } - /** - * @param string $path - */ - protected function removeCachedFile($path) { + protected function removeCachedFile(string $path): void { unset($this->cachedFiles[$path]); } @@ -48,7 +47,7 @@ trait LocalTempFileTrait { } $tmpFile = \OC::$server->getTempManager()->getTemporaryFile($extension); $target = fopen($tmpFile, 'w'); - \OC_Helper::streamCopy($source, $target); + Files::streamCopy($source, $target); fclose($target); return $tmpFile; } |