[Pkg-owncloud-commits] [owncloud] 45/83: Add post hooks for filesystem scanner
David Prévot
taffit at moszumanska.debian.org
Wed Dec 18 13:05:30 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch 5.0
in repository owncloud.
commit f0f0be8b2b58b056c29410596b4a744a5b3b52f7
Author: Robin Appelman <icewind at owncloud.com>
Date: Thu Nov 7 16:22:29 2013 +0100
Add post hooks for filesystem scanner
---
lib/files/cache/scanner.php | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php
index af819c4..429685c 100644
--- a/lib/files/cache/scanner.php
+++ b/lib/files/cache/scanner.php
@@ -17,6 +17,8 @@ use OC\Hooks\BasicEmitter;
* Hooks available in scope \OC\Files\Cache\Scanner:
* - scanFile(string $path, string $storageId)
* - scanFolder(string $path, string $storageId)
+ * - postScanFile(string $path, string $storageId)
+ * - postScanFolder(string $path, string $storageId)
*
* @package OC\Files\Cache
*/
@@ -141,6 +143,8 @@ class Scanner extends BasicEmitter {
}
if (!empty($newData)) {
$this->cache->put($file, $newData);
+ $this->emit('\OC\Files\Cache\Scanner', 'postScanFile', array($file, $this->storageId));
+ \OC_Hook::emit('\OC\Files\Cache\Scanner', 'post_scan_file', array('path' => $file, 'storage' => $this->storageId));
}
} else {
$this->cache->remove($file);
@@ -227,6 +231,7 @@ class Scanner extends BasicEmitter {
}
$this->cache->put($path, array('size' => $size));
}
+ $this->emit('\OC\Files\Cache\Scanner', 'postScanFolder', array($path, $this->storageId));
return $size;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list