summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSam Tuke <samtuke@owncloud.com>2012-06-19 19:42:40 +0100
committerSam Tuke <samtuke@owncloud.com>2012-06-19 19:42:40 +0100
commit28a72e0e3c25ecf8cc5ab61a4398ab687072b203 (patch)
treec1d3a0f381e1fb6202f282f09d15ffb698d33d17 /lib
parentf11e4d7cd6c5cae9a0be52dff0bb2f32e20e7099 (diff)
downloadnextcloud-server-28a72e0e3c25ecf8cc5ab61a4398ab687072b203.tar.gz
nextcloud-server-28a72e0e3c25ecf8cc5ab61a4398ab687072b203.zip
Fixed deleteAll function for deleting all old versions of files (expireAll)
Added new readdir() method to all storage classes and handlers (only working implementation in local.php)
Diffstat (limited to 'lib')
-rw-r--r--lib/filestorage.php1
-rw-r--r--lib/filestorage/local.php3
-rw-r--r--lib/filesystem.php3
-rw-r--r--lib/filesystemview.php4
4 files changed, 11 insertions, 0 deletions
diff --git a/lib/filestorage.php b/lib/filestorage.php
index 71ef4aed00b..bf353bb0cce 100644
--- a/lib/filestorage.php
+++ b/lib/filestorage.php
@@ -28,6 +28,7 @@ abstract class OC_Filestorage{
abstract public function mkdir($path);
abstract public function rmdir($path);
abstract public function opendir($path);
+ abstract public function readdir($path);
abstract public function is_dir($path);
abstract public function is_file($path);
abstract public function stat($path);
diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php
index 44a2ab0f634..27794fe17c0 100644
--- a/lib/filestorage/local.php
+++ b/lib/filestorage/local.php
@@ -20,6 +20,9 @@ class OC_Filestorage_Local extends OC_Filestorage{
public function opendir($path){
return opendir($this->datadir.$path);
}
+ public function readdir($handle){
+ return readdir($handle);
+ }
public function is_dir($path){
if(substr($path,-1)=='/'){
$path=substr($path,0,-1);
diff --git a/lib/filesystem.php b/lib/filesystem.php
index 89de533d725..0d0943d3639 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -399,6 +399,9 @@ class OC_Filesystem{
static public function opendir($path){
return self::$defaultInstance->opendir($path);
}
+ static public function readdir($path){
+ return self::$defaultInstance->readdir($path);
+ }
static public function is_dir($path){
return self::$defaultInstance->is_dir($path);
}
diff --git a/lib/filesystemview.php b/lib/filesystemview.php
index 813a87cd74e..da622bcf920 100644
--- a/lib/filesystemview.php
+++ b/lib/filesystemview.php
@@ -158,6 +158,10 @@ class OC_FilesystemView {
public function opendir($path){
return $this->basicOperation('opendir',$path,array('read'));
}
+ public function readdir($handle){
+ $fsLocal= new OC_Filestorage_Local( array( 'datadir' => '/' ) );
+ return $fsLocal->readdir( $handle );
+ }
public function is_dir($path){
if($path=='/'){
return true;