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