diff options
Diffstat (limited to 'lib/filesystem.php')
-rw-r--r-- | lib/filesystem.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/filesystem.php b/lib/filesystem.php index 03fbecdc4c0..2b5c3a56b6e 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -457,5 +457,20 @@ class OC_FILESYSTEM{ return $storage->free_space($path); } } + + static public function search($query){ + $files=array(); + $fakeRootLength=strlen(self::$fakeRoot); + foreach(self::$storages as $mountpoint=>$storage){ + $results=$storage->search($query); + foreach($results as $result){ + $file=str_replace('//','/',$mountpoint.$result); + $file=substr($file,$fakeRootLength); + $files[]=$file; + } + } + return $files; + + } } ?> |