diff options
author | Robin McCorkell <rmccorkell@owncloud.com> | 2015-08-07 22:16:47 +0100 |
---|---|---|
committer | Robin McCorkell <rmccorkell@owncloud.com> | 2015-08-07 22:16:47 +0100 |
commit | 214729a5524e2c406415985717c174bedc810954 (patch) | |
tree | b1b27273ef8f951e1cdba1aa60eb334843dee418 /lib/private/files | |
parent | ca8f7fd69c63a8149e73df98d77e489b319f37e4 (diff) | |
parent | da951ba059209914849dd9a289ea3f398bbab70e (diff) | |
download | nextcloud-server-214729a5524e2c406415985717c174bedc810954.tar.gz nextcloud-server-214729a5524e2c406415985717c174bedc810954.zip |
Merge pull request #14779 from owncloud/use-iterator-directory
Use the new IteratorDirectory instead of the fakedir wrapper
Diffstat (limited to 'lib/private/files')
-rw-r--r-- | lib/private/files/objectstore/objectstorestorage.php | 5 | ||||
-rw-r--r-- | lib/private/files/storage/dav.php | 5 | ||||
-rw-r--r-- | lib/private/files/storage/local.php | 1 |
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 24cf3c29209..6e89dcccbcd 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 */ |