Code Duplication    Length = 10-10 lines in 2 locations

lib/private/files/view.php 2 locations

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