summaryrefslogtreecommitdiffstats
path: root/lib/filestorage.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-03-16 17:28:01 +0100
committerRobin Appelman <icewind1991@gmail.com>2011-03-17 20:55:41 +0100
commitef5bd659fa89e5e0284a12717d6914fd13418176 (patch)
tree0e9653857e5172e393bf17a1d525776b398eb871 /lib/filestorage.php
parenta3070405d94621d01cc97ca10cc9cdf220e14064 (diff)
downloadnextcloud-server-ef5bd659fa89e5e0284a12717d6914fd13418176.tar.gz
nextcloud-server-ef5bd659fa89e5e0284a12717d6914fd13418176.zip
added OC_FILESYSTEM::hash()
syntax is the same has http://www.php.net/manual/en/function.hash-file.php
Diffstat (limited to 'lib/filestorage.php')
-rw-r--r--lib/filestorage.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/filestorage.php b/lib/filestorage.php
index 06ce26f0d23..3a0d124cbf2 100644
--- a/lib/filestorage.php
+++ b/lib/filestorage.php
@@ -73,6 +73,7 @@ class OC_FILESTORAGE{
public function delTree($path){}
public function find($path){}
public function getTree($path){}
+ public function hash($type,$path,$raw){}
}
@@ -428,5 +429,12 @@ class OC_FILESTORAGE_LOCAL extends OC_FILESTORAGE{
}
return $tree;
}
+
+ public function hash($type,$path,$raw){
+ if($return=hash_file($type,$this->datadir.$path,$raw)){
+ $this->notifyObservers($path,OC_FILEACTION_READ);
+ }
+ return $return;
+ }
}
?> \ No newline at end of file