diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-04-22 17:50:04 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-04-23 02:30:12 +0200 |
commit | 4c0d6dc9e7842e1a21e5c01f50e0b61edffa34bf (patch) | |
tree | 75b83340b7c29b1f959d5a4de3db622fde70333d /lib/filesystem.php | |
parent | 3e47ce3cef71306921f05fce9bdf19cceaf1c2a8 (diff) | |
download | nextcloud-server-4c0d6dc9e7842e1a21e5c01f50e0b61edffa34bf.tar.gz nextcloud-server-4c0d6dc9e7842e1a21e5c01f50e0b61edffa34bf.zip |
make OC_HOOKS actually work
Diffstat (limited to 'lib/filesystem.php')
-rw-r--r-- | lib/filesystem.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/filesystem.php b/lib/filesystem.php index ca4d1a2c474..03fbecdc4c0 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -194,6 +194,18 @@ class OC_FILESYSTEM{ } return $foundMountPoint; } + /** + * return the path to a local version of the file + * we need this because we can't know if a file is stored local or not from outside the filestorage and for some purposes a local file is needed + * @param string path + * @return string + */ + static public function getLocalFile($path){ + $parent=substr($path,0,strrpos($path,'/')); + if(self::canRead($parent) and $storage=self::getStorage($path)){ + return $storage->getLocalFile(self::getInternalPath($path)); + } + } static public function mkdir($path){ $parent=substr($path,0,strrpos($path,'/')); |