* @return int, Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE
*/
public function getStatus($file) {
+ if ($file == '') {
+ return self::COMPLETE;
+ }
if ($cache = $this->getSourceCache($file)) {
return $cache->getStatus($this->files[$file]);
}
}
public function free_space($path) {
+ if ($path == '') {
+ return -1;
+ }
$source = $this->getSourcePath($path);
if ($source) {
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($source);
\OC\Files\Filesystem::mount('\OC\Files\Storage\Shared', array('sharedFolder' => '/Shared'), $user_dir.'/Shared/');
}
+ public function hasUpdated($path, $time) {
+ if ($path == '') {
+ return false;
+ }
+ return $this->filemtime($path) > $time;
+ }
+
public function getCache() {
return new \OC\Files\Cache\Shared_Cache($this);
}
}
public function getOwner($path) {
+ if ($path == '') {
+ return false;
+ }
$source = $this->getFile($path);
if ($source) {
return $source['uid_owner'];
*/
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($path);
$owner=$storage->getOwner($internalPath);
+ if (!$owner) {
+ return -1;
+ }
$totalSpace=$this->getQuota($owner);
if($totalSpace==-1) {
$rootInfo=$view->getFileInfo('/');
$usedSpace=isset($rootInfo['size'])?$rootInfo['size']:0;
- $usedSpace=isset($sharedInfo['size'])?$usedSpace-$sharedInfo['size']:$usedSpace;
return $totalSpace-$usedSpace;
}