summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-03-15 11:18:39 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-03-15 11:18:39 +0100
commitd6b326650bbba9fc353154150bf823a1ad5d6c04 (patch)
treea8f790b2a2be4cc00e72a506bc9b1068eadcd7b4 /lib/private
parent23a02eaf141647c12f964651ba86299966a2d108 (diff)
downloadnextcloud-server-d6b326650bbba9fc353154150bf823a1ad5d6c04.tar.gz
nextcloud-server-d6b326650bbba9fc353154150bf823a1ad5d6c04.zip
Emit read for nodes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Node/HookConnector.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/private/Files/Node/HookConnector.php b/lib/private/Files/Node/HookConnector.php
index 27f65d9987b..f5adcde4a00 100644
--- a/lib/private/Files/Node/HookConnector.php
+++ b/lib/private/Files/Node/HookConnector.php
@@ -72,6 +72,8 @@ class HookConnector {
Util::connectHook('OC_Filesystem', 'touch', $this, 'touch');
Util::connectHook('OC_Filesystem', 'post_touch', $this, 'postTouch');
+
+ Util::connectHook('OC_Filesystem', 'read', $this, 'read');
}
public function write($arguments) {
@@ -140,6 +142,11 @@ class HookConnector {
$this->root->emit('\OC\Files', 'postCopy', [$source, $target]);
}
+ public function read($arguments) {
+ $node = $this->getNodeForPath($arguments['path']);
+ $this->root->emit('\OC\Files', 'read', [$node]);
+ }
+
private function getNodeForPath($path) {
$info = Filesystem::getView()->getFileInfo($path);
if (!$info) {