added OC_FILESYSTEM::hash()
syntax is the same has http://www.php.net/manual/en/function.hash-file.php
This commit is contained in:
parent
39292ba053
commit
e5de3dd94b
|
@ -73,6 +73,7 @@ class OC_FILESTORAGE{
|
||||||
public function delTree($path){}
|
public function delTree($path){}
|
||||||
public function find($path){}
|
public function find($path){}
|
||||||
public function getTree($path){}
|
public function getTree($path){}
|
||||||
|
public function hash($type,$path,$raw){}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -432,5 +433,12 @@ class OC_FILESTORAGE_LOCAL extends OC_FILESTORAGE{
|
||||||
}
|
}
|
||||||
return $tree;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
|
@ -376,5 +376,10 @@ class OC_FILESYSTEM{
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
static public function hash($type,$path,$raw=false){
|
||||||
|
if(self::canRead($path) and $storage=self::getStorage($path)){
|
||||||
|
return $storage->hash($type,self::getInternalPath($path),$raw);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue