Code Duplication    Length = 10-10 lines in 2 locations

lib/private/Files/View.php 2 locations

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