Code Duplication    Length = 10-10 lines in 2 locations

lib/private/files/view.php 2 locations

@@ 218-227 (lines=10) @@
215
	 * @param string $path
216
	 * @return string
217
	 */
218
	public function getLocalFile($path) {
219
		$parent = substr($path, 0, strrpos($path, '/'));
220
		$path = $this->getAbsolutePath($path);
221
		list($storage, $internalPath) = Filesystem::resolvePath($path);
222
		if (Filesystem::isValidPath($parent) and $storage) {
223
			return $storage->getLocalFile($internalPath);
224
		} else {
225
			return null;
226
		}
227
	}
228
229
	/**
230
	 * @param string $path
@@ 233-242 (lines=10) @@
230
	 * @param string $path
231
	 * @return string
232
	 */
233
	public function getLocalFolder($path) {
234
		$parent = substr($path, 0, strrpos($path, '/'));
235
		$path = $this->getAbsolutePath($path);
236
		list($storage, $internalPath) = Filesystem::resolvePath($path);
237
		if (Filesystem::isValidPath($parent) and $storage) {
238
			return $storage->getLocalFolder($internalPath);
239
		} else {
240
			return null;
241
		}
242
	}
243
244
	/**
245
	 * the following functions operate with arguments and return values identical