summaryrefslogtreecommitdiffstats
path: root/apps/files_archive/lib
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-05-02 12:54:31 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-05-02 12:54:31 +0200
commit8c7f8546716ac77cdeaa134caf9fae22232ce213 (patch)
tree80c98f5aaf0274e5c38c3d55af9400a720552745 /apps/files_archive/lib
parentf1830866a3f20e50c3d409d3cdd508a98fc56377 (diff)
downloadnextcloud-server-8c7f8546716ac77cdeaa134caf9fae22232ce213.tar.gz
nextcloud-server-8c7f8546716ac77cdeaa134caf9fae22232ce213.zip
move all the files stuff into a files class
Diffstat (limited to 'apps/files_archive/lib')
-rwxr-xr-xapps/files_archive/lib/storage.php2
-rwxr-xr-xapps/files_archive/lib/tar.php12
-rwxr-xr-xapps/files_archive/lib/zip.php2
3 files changed, 8 insertions, 8 deletions
diff --git a/apps/files_archive/lib/storage.php b/apps/files_archive/lib/storage.php
index 7a4ae339621..086a338db25 100755
--- a/apps/files_archive/lib/storage.php
+++ b/apps/files_archive/lib/storage.php
@@ -104,7 +104,7 @@ class OC_Filestorage_Archive extends OC_Filestorage_Common{
}
public function touch($path, $mtime=null){
if(is_null($mtime)){
- $tmpFile=OCP\Util::tmpFile();
+ $tmpFile=OCP\Files::tmpFile();
$this->archive->extractFile($path,$tmpFile);
$this->archive->addfile($path,$tmpFile);
}else{
diff --git a/apps/files_archive/lib/tar.php b/apps/files_archive/lib/tar.php
index 3a07a28906c..2cb8dc2a8ae 100755
--- a/apps/files_archive/lib/tar.php
+++ b/apps/files_archive/lib/tar.php
@@ -93,7 +93,7 @@ class OC_Archive_TAR extends OC_Archive{
*/
function rename($source,$dest){
//no proper way to delete, rename entire archive, rename file and remake archive
- $tmp=OCP\Util::tmpFolder();
+ $tmp=OCP\Files::tmpFolder();
$this->tar->extract($tmp);
rename($tmp.$source,$tmp.$dest);
$this->tar=null;
@@ -177,7 +177,7 @@ class OC_Archive_TAR extends OC_Archive{
* @return bool
*/
function extractFile($path,$dest){
- $tmp=OCP\Util::tmpFolder();
+ $tmp=OCP\Files::tmpFolder();
if(!$this->fileExists($path)){
return false;
}
@@ -185,7 +185,7 @@ class OC_Archive_TAR extends OC_Archive{
if($success){
rename($tmp.$path,$dest);
}
- OCP\Util::rmdirr($tmp);
+ OCP\Files::rmdirr($tmp);
return $success;
}
/**
@@ -216,9 +216,9 @@ class OC_Archive_TAR extends OC_Archive{
return false;
}
//no proper way to delete, extract entire archive, delete file and remake archive
- $tmp=OCP\Util::tmpFolder();
+ $tmp=OCP\Files::tmpFolder();
$this->tar->extract($tmp);
- OCP\Util::rmdirr($tmp.$path);
+ OCP\Files::rmdirr($tmp.$path);
$this->tar=null;
unlink($this->path);
$this->reopen();
@@ -237,7 +237,7 @@ class OC_Archive_TAR extends OC_Archive{
}else{
$ext='';
}
- $tmpFile=OCP\Util::tmpFile($ext);
+ $tmpFile=OCP\Files::tmpFile($ext);
if($this->fileExists($path)){
$this->extractFile($path,$tmpFile);
}elseif($mode=='r' or $mode=='rb'){
diff --git a/apps/files_archive/lib/zip.php b/apps/files_archive/lib/zip.php
index 16f722a734e..22ab48937eb 100755
--- a/apps/files_archive/lib/zip.php
+++ b/apps/files_archive/lib/zip.php
@@ -169,7 +169,7 @@ class OC_Archive_ZIP extends OC_Archive{
}else{
$ext='';
}
- $tmpFile=OCP\Util::tmpFile($ext);
+ $tmpFile=OCP\Files::tmpFile($ext);
OC_CloseStreamWrapper::$callBacks[$tmpFile]=array($this,'writeBack');
if($this->fileExists($path)){
$this->extractFile($path,$tmpFile);