summaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage/temporary.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files/storage/temporary.php')
-rw-r--r--lib/private/files/storage/temporary.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/private/files/storage/temporary.php b/lib/private/files/storage/temporary.php
new file mode 100644
index 00000000000..d84dbda2e39
--- /dev/null
+++ b/lib/private/files/storage/temporary.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Files\Storage;
+
+/**
+ * local storage backend in temporary folder for testing purpose
+ */
+class Temporary extends Local{
+ public function __construct($arguments) {
+ parent::__construct(array('datadir' => \OC_Helper::tmpFolder()));
+ }
+
+ public function cleanUp() {
+ \OC_Helper::rmdirr($this->datadir);
+ }
+
+ public function __destruct() {
+ parent::__destruct();
+ $this->cleanUp();
+ }
+}