diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-08-19 02:42:15 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-08-19 02:42:15 +0200 |
commit | 154ce0f68ddd7b1d2a173515cf3c3ceab3611a48 (patch) | |
tree | 32d0ee226bc542493f1809631d175332f97044de /lib/filesystemview.php | |
parent | 9b44d0cb32795c5ec645922b204de88c8f33c196 (diff) | |
download | nextcloud-server-154ce0f68ddd7b1d2a173515cf3c3ceab3611a48.tar.gz nextcloud-server-154ce0f68ddd7b1d2a173515cf3c3ceab3611a48.zip |
also add getLocalFolder to OC_Filsystem and OC_FilesystemView
Diffstat (limited to 'lib/filesystemview.php')
-rw-r--r-- | lib/filesystemview.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/filesystemview.php b/lib/filesystemview.php index 571c75f8f31..6e76e1b6da5 100644 --- a/lib/filesystemview.php +++ b/lib/filesystemview.php @@ -147,6 +147,16 @@ class OC_FilesystemView { return $storage->getLocalFile($this->getInternalPath($path)); } } + /** + * @param string path + * @return string + */ + public function getLocalFolder($path) { + $parent=substr($path, 0, strrpos($path,'/')); + if(OC_Filesystem::isValidPath($parent) and $storage=$this->getStorage($path)) { + return $storage->getLocalFolder($this->getInternalPath($path)); + } + } /** * the following functions operate with arguments and return values identical |