diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-05-11 20:33:43 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-05-11 20:33:56 +0200 |
commit | 0622fa79ba8f257cf8c48fa495f4e1bc708ca886 (patch) | |
tree | 79fd370245da3bff54e1d0f208c5314de27d9092 /lib/filestorage | |
parent | b40f9670ae28bfacc899a6fe734bd6d4b512a83d (diff) | |
download | nextcloud-server-0622fa79ba8f257cf8c48fa495f4e1bc708ca886.tar.gz nextcloud-server-0622fa79ba8f257cf8c48fa495f4e1bc708ca886.zip |
add temporary filestorage backend for testing purposed
Diffstat (limited to 'lib/filestorage')
-rw-r--r-- | lib/filestorage/local.php | 2 | ||||
-rw-r--r-- | lib/filestorage/temporary.php | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php index bd757f52ce7..ea9a9070263 100644 --- a/lib/filestorage/local.php +++ b/lib/filestorage/local.php @@ -3,7 +3,7 @@ * for local filestore, we only have to map the paths */ class OC_Filestorage_Local extends OC_Filestorage{ - private $datadir; + protected $datadir; private static $mimetypes=null; public function __construct($arguments){ $this->datadir=$arguments['datadir']; diff --git a/lib/filestorage/temporary.php b/lib/filestorage/temporary.php new file mode 100644 index 00000000000..8f2373c8e95 --- /dev/null +++ b/lib/filestorage/temporary.php @@ -0,0 +1,17 @@ +<?php +/** + * local storage backnd in temporary folder for testing purpores + */ +class OC_Filestorage_Temporary extends OC_Filestorage_Local{ + public function __construct($arguments){ + $this->datadir=OC_Helper::tmpFolder(); + } + + public function cleanUp(){ + OC_Helper::rmdirr($this->datadir); + } + + public function __destruct(){ + $this->cleanUp(); + } +} |