|
@@ 244-253 (lines=10) @@
|
| 241 |
|
* @param string $path |
| 242 |
|
* @return string |
| 243 |
|
*/ |
| 244 |
|
public function getLocalFile($path) { |
| 245 |
|
$parent = \substr($path, 0, \strrpos($path, '/')); |
| 246 |
|
$path = $this->getAbsolutePath($path); |
| 247 |
|
list($storage, $internalPath) = Filesystem::resolvePath($path); |
| 248 |
|
if (Filesystem::isValidPath($parent) and $storage) { |
| 249 |
|
return $storage->getLocalFile($internalPath); |
| 250 |
|
} else { |
| 251 |
|
return null; |
| 252 |
|
} |
| 253 |
|
} |
| 254 |
|
|
| 255 |
|
/** |
| 256 |
|
* @param string $path |
|
@@ 259-268 (lines=10) @@
|
| 256 |
|
* @param string $path |
| 257 |
|
* @return string |
| 258 |
|
*/ |
| 259 |
|
public function getLocalFolder($path) { |
| 260 |
|
$parent = \substr($path, 0, \strrpos($path, '/')); |
| 261 |
|
$path = $this->getAbsolutePath($path); |
| 262 |
|
list($storage, $internalPath) = Filesystem::resolvePath($path); |
| 263 |
|
if (Filesystem::isValidPath($parent) and $storage) { |
| 264 |
|
return $storage->getLocalFolder($internalPath); |
| 265 |
|
} else { |
| 266 |
|
return null; |
| 267 |
|
} |
| 268 |
|
} |
| 269 |
|
|
| 270 |
|
/** |
| 271 |
|
* the following functions operate with arguments and return values identical |