summaryrefslogtreecommitdiffstats
path: root/lib/filecache.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-01-30 23:32:55 +0100
committerRobin Appelman <icewind@owncloud.com>2012-01-30 23:32:55 +0100
commitffecc3e4341102714a89ab6b5643c666c1feb0ee (patch)
tree8bfb658e085259440a1ad686a68bd3c1fff1f229 /lib/filecache.php
parent8543e797132a0b99127d7813e24dbb9c024a4fe8 (diff)
downloadnextcloud-server-ffecc3e4341102714a89ab6b5643c666c1feb0ee.tar.gz
nextcloud-server-ffecc3e4341102714a89ab6b5643c666c1feb0ee.zip
start of proper feedback during filessytem scan
Diffstat (limited to 'lib/filecache.php')
-rw-r--r--lib/filecache.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/filecache.php b/lib/filecache.php
index 928fc02e669..4e458ad929a 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -288,8 +288,9 @@ class OC_FileCache{
* recursively scan the filesystem and fill the cache
* @param string $path
* @param bool $onlyChilds
+ * @param OC_EventSource $enventSource
*/
- public static function scan($path,$onlyChilds=false){//PROBLEM due to the order things are added, all parents are -1
+ public static function scan($path,$onlyChilds,$eventSource){//PROBLEM due to the order things are added, all parents are -1
$dh=OC_Filesystem::opendir($path);
$stat=OC_Filesystem::stat($path);
$mimetype=OC_Filesystem::getMimeType($path);
@@ -305,12 +306,13 @@ class OC_FileCache{
if($filename != '.' and $filename != '..'){
$file=$path.'/'.$filename;
if(OC_Filesystem::is_dir($file)){
- self::scan($file,true);
+ self::scan($file,true,$eventSource);
}else{
$stat=OC_Filesystem::stat($file);
$mimetype=OC_Filesystem::getMimeType($file);
$stat['mimetype']=$mimetype;
self::put($file,$stat);
+ $eventSource->send('scanned',$file);
$totalSize+=$stat['size'];
}
}