Skip to content
Snippets Groups Projects
Commit 154ce0f6 authored by Robin Appelman's avatar Robin Appelman
Browse files

also add getLocalFolder to OC_Filsystem and OC_FilesystemView

parent 9b44d0cb
Branches
No related tags found
No related merge requests found
......@@ -336,6 +336,13 @@ class OC_Filesystem{
static public function getLocalFile($path){
return self::$defaultInstance->getLocalFile($path);
}
/**
* @param string path
* @return string
*/
static public function getLocalFolder($path){
return self::$defaultInstance->getLocalFolder($path);
}
/**
* return path to file which reflects one visible in browser
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment