Code Duplication    Length = 10-10 lines in 2 locations

lib/private/files/view.php 2 locations

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