Code Duplication    Length = 10-10 lines in 2 locations

lib/private/Files/View.php 2 locations

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