|
@@ 163-172 (lines=10) @@
|
| 160 |
|
* @param string $path |
| 161 |
|
* @return string |
| 162 |
|
*/ |
| 163 |
|
public function getLocalFile($path) { |
| 164 |
|
$parent = substr($path, 0, strrpos($path, '/')); |
| 165 |
|
$path = $this->getAbsolutePath($path); |
| 166 |
|
list($storage, $internalPath) = Filesystem::resolvePath($path); |
| 167 |
|
if (Filesystem::isValidPath($parent) and $storage) { |
| 168 |
|
return $storage->getLocalFile($internalPath); |
| 169 |
|
} else { |
| 170 |
|
return null; |
| 171 |
|
} |
| 172 |
|
} |
| 173 |
|
|
| 174 |
|
/** |
| 175 |
|
* @param string $path |
|
@@ 178-187 (lines=10) @@
|
| 175 |
|
* @param string $path |
| 176 |
|
* @return string |
| 177 |
|
*/ |
| 178 |
|
public function getLocalFolder($path) { |
| 179 |
|
$parent = substr($path, 0, strrpos($path, '/')); |
| 180 |
|
$path = $this->getAbsolutePath($path); |
| 181 |
|
list($storage, $internalPath) = Filesystem::resolvePath($path); |
| 182 |
|
if (Filesystem::isValidPath($parent) and $storage) { |
| 183 |
|
return $storage->getLocalFolder($internalPath); |
| 184 |
|
} else { |
| 185 |
|
return null; |
| 186 |
|
} |
| 187 |
|
} |
| 188 |
|
|
| 189 |
|
/** |
| 190 |
|
* the following functions operate with arguments and return values identical |