diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-19 10:52:35 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-19 10:52:35 +0100 |
commit | 47a300814186061991821f8a707c63a3de636b6d (patch) | |
tree | 8db21adb6842f60faab6505422566896228aeff9 /lib | |
parent | 63bc633d89e53c2ff04d3fd521a2a1b18f6737f7 (diff) | |
download | nextcloud-server-47a300814186061991821f8a707c63a3de636b6d.tar.gz nextcloud-server-47a300814186061991821f8a707c63a3de636b6d.zip |
Remove \OCP\Files::tmpFile
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Archive/TAR.php | 2 | ||||
-rw-r--r-- | lib/private/Archive/ZIP.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Storage/Flysystem.php | 2 | ||||
-rw-r--r-- | lib/public/Files.php | 13 |
4 files changed, 3 insertions, 16 deletions
diff --git a/lib/private/Archive/TAR.php b/lib/private/Archive/TAR.php index f37da6fc52d..c9396673399 100644 --- a/lib/private/Archive/TAR.php +++ b/lib/private/Archive/TAR.php @@ -346,7 +346,7 @@ class TAR extends Archive { } else { $ext = ''; } - $tmpFile = \OCP\Files::tmpFile($ext); + $tmpFile = \OC::$server->getTempManager()->getTemporaryFile($ext); if ($this->fileExists($path)) { $this->extractFile($path, $tmpFile); } elseif ($mode == 'r' or $mode == 'rb') { diff --git a/lib/private/Archive/ZIP.php b/lib/private/Archive/ZIP.php index fb3e2fdde97..fb727aba224 100644 --- a/lib/private/Archive/ZIP.php +++ b/lib/private/Archive/ZIP.php @@ -198,7 +198,7 @@ class ZIP extends Archive{ }else{ $ext=''; } - $tmpFile=\OCP\Files::tmpFile($ext); + $tmpFile = \OC::$server->getTempManager()->getTemporaryFile($ext); if($this->fileExists($path)) { $this->extractFile($path, $tmpFile); } diff --git a/lib/private/Files/Storage/Flysystem.php b/lib/private/Files/Storage/Flysystem.php index 423a6f0d83e..232222db358 100644 --- a/lib/private/Files/Storage/Flysystem.php +++ b/lib/private/Files/Storage/Flysystem.php @@ -206,7 +206,7 @@ abstract class Flysystem extends Common { if (!$this->isCreatable(dirname($path))) { return false; } - $tmpFile = \OCP\Files::tmpFile(); + $tmpFile = \OC::$server->getTempManager()->getTemporaryFile(); } $source = fopen($tmpFile, $mode); return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath) { diff --git a/lib/public/Files.php b/lib/public/Files.php index d66e0f1b645..e596997a47e 100644 --- a/lib/public/Files.php +++ b/lib/public/Files.php @@ -89,19 +89,6 @@ class Files { } /** - * Create a temporary file with an unique filename - * @param string $postfix - * @return string - * - * temporary files are automatically cleaned up after the script is finished - * @deprecated 8.1.0 use getTemporaryFile() of \OCP\ITempManager - \OC::$server->getTempManager() - * @since 5.0.0 - */ - public static function tmpFile( $postfix='' ) { - return \OC::$server->getTempManager()->getTemporaryFile($postfix); - } - - /** * Create a temporary folder with an unique filename * @return string * |