Skip to content

Commit d6b3266

Browse files
committed
Emit read for nodes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
1 parent 23a02ea commit d6b3266

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/private/Files/Node/HookConnector.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ public function viewToNode() {
7272

7373
Util::connectHook('OC_Filesystem', 'touch', $this, 'touch');
7474
Util::connectHook('OC_Filesystem', 'post_touch', $this, 'postTouch');
75+
76+
Util::connectHook('OC_Filesystem', 'read', $this, 'read');
7577
}
7678

7779
public function write($arguments) {
@@ -140,6 +142,11 @@ public function postCopy($arguments) {
140142
$this->root->emit('\OC\Files', 'postCopy', [$source, $target]);
141143
}
142144

145+
public function read($arguments) {
146+
$node = $this->getNodeForPath($arguments['path']);
147+
$this->root->emit('\OC\Files', 'read', [$node]);
148+
}
149+
143150
private function getNodeForPath($path) {
144151
$info = Filesystem::getView()->getFileInfo($path);
145152
if (!$info) {

0 commit comments

Comments
 (0)