Code Duplication    Length = 10-10 lines in 2 locations

lib/private/Files/View.php 2 locations

@@ 229-238 (lines=10) @@
226
	 * @param string $path
227
	 * @return string
228
	 */
229
	public function getLocalFile($path) {
230
		$parent = substr($path, 0, strrpos($path, '/'));
231
		$path = $this->getAbsolutePath($path);
232
		list($storage, $internalPath) = Filesystem::resolvePath($path);
233
		if (Filesystem::isValidPath($parent) and $storage) {
234
			return $storage->getLocalFile($internalPath);
235
		} else {
236
			return null;
237
		}
238
	}
239
240
	/**
241
	 * @param string $path
@@ 244-253 (lines=10) @@
241
	 * @param string $path
242
	 * @return string
243
	 */
244
	public function getLocalFolder($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->getLocalFolder($internalPath);
250
		} else {
251
			return null;
252
		}
253
	}
254
255
	/**
256
	 * the following functions operate with arguments and return values identical