summaryrefslogtreecommitdiffstats
path: root/lib/private/Files
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-03-15 14:04:14 +0100
committerGitHub <noreply@github.com>2018-03-15 14:04:14 +0100
commitfa886ef4eba0d7bdfdccc5e46de9971174598394 (patch)
treee29a84d7ecc6a5976a7db1a2c07eb89005c4bb5b /lib/private/Files
parent208e38e84e1a07a49699aa90dc5b7272d24489f0 (diff)
parentd6b326650bbba9fc353154150bf823a1ad5d6c04 (diff)
downloadnextcloud-server-fa886ef4eba0d7bdfdccc5e46de9971174598394.tar.gz
nextcloud-server-fa886ef4eba0d7bdfdccc5e46de9971174598394.zip
Merge pull request #8830 from nextcloud/node_emit_read
Emit read for nodes
Diffstat (limited to 'lib/private/Files')
-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) {