also add getLocalFolder to OC_Filsystem and OC_FilesystemView
This commit is contained in:
parent
9b44d0cb32
commit
154ce0f68d
2 changed files with 17 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue