summaryrefslogtreecommitdiffstats
path: root/lib/private/files
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-03-10 16:30:13 +0100
committerRobin Appelman <icewind@owncloud.com>2015-07-15 13:57:53 +0200
commitda951ba059209914849dd9a289ea3f398bbab70e (patch)
treea20b027f9cc6a51002984c79a49de64b6fd76316 /lib/private/files
parent5581ae12a1c1e60a09108855d6f2bbfc620f7bf1 (diff)
downloadnextcloud-server-da951ba059209914849dd9a289ea3f398bbab70e.tar.gz
nextcloud-server-da951ba059209914849dd9a289ea3f398bbab70e.zip
Use the new IteratorDirectory instead of the fakedir wrapper
Diffstat (limited to 'lib/private/files')
-rw-r--r--lib/private/files/objectstore/objectstorestorage.php5
-rw-r--r--lib/private/files/storage/dav.php5
-rw-r--r--lib/private/files/storage/local.php1
3 files changed, 4 insertions, 7 deletions
diff --git a/lib/private/files/objectstore/objectstorestorage.php b/lib/private/files/objectstore/objectstorestorage.php
index 24398649727..a85553186ae 100644
--- a/lib/private/files/objectstore/objectstorestorage.php
+++ b/lib/private/files/objectstore/objectstorestorage.php
@@ -24,6 +24,7 @@
namespace OC\Files\ObjectStore;
+use Icewind\Streams\IteratorDirectory;
use OCP\Files\ObjectStore\IObjectStore;
class ObjectStoreStorage extends \OC\Files\Storage\Common {
@@ -216,9 +217,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
$files[] = $file['name'];
}
- \OC\Files\Stream\Dir::register('objectstore' . $path . '/', $files);
-
- return opendir('fakedir://objectstore' . $path . '/');
+ return IteratorDirectory::wrap($files);
} catch (\Exception $e) {
\OCP\Util::writeLog('objectstore', $e->getMessage(), \OCP\Util::ERROR);
return false;
diff --git a/lib/private/files/storage/dav.php b/lib/private/files/storage/dav.php
index e02f971b38b..4be587e7799 100644
--- a/lib/private/files/storage/dav.php
+++ b/lib/private/files/storage/dav.php
@@ -38,7 +38,7 @@ namespace OC\Files\Storage;
use Exception;
use OC\Files\Filesystem;
use OC\Files\Stream\Close;
-use OC\Files\Stream\Dir;
+use Icewind\Streams\IteratorDirectory;
use OC\MemCache\ArrayCache;
use OCP\Constants;
use OCP\Files;
@@ -211,8 +211,7 @@ class DAV extends Common {
$file = basename($file);
$content[] = $file;
}
- Dir::register($id, $content);
- return opendir('fakedir://' . $id);
+ return IteratorDirectory::wrap($content);
} catch (ClientHttpException $e) {
if ($e->getHttpStatus() === 404) {
$this->statCache->clear($path . '/');
diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php
index b7272b7d1f0..3676fe69131 100644
--- a/lib/private/files/storage/local.php
+++ b/lib/private/files/storage/local.php
@@ -35,7 +35,6 @@
*/
namespace OC\Files\Storage;
-
/**
* for local filestore, we only have to map the paths
*/