also add getLocalFolder to OC_Filsystem and OC_FilesystemView

remotes/origin/stable45
Robin Appelman 14 years ago
parent 9b44d0cb32
commit 154ce0f68d
  1. 7
      lib/filesystem.php
  2. 10
      lib/filesystemview.php

@ -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…
Cancel
Save