Code Duplication    Length = 11-12 lines in 2 locations

apps/files_external/lib/Lib/Storage/SMB.php 2 locations

@@ 413-424 (lines=12) @@
410
		}
411
	}
412
413
	public function touch($path, $time = null) {
414
		try {
415
			if (!$this->file_exists($path)) {
416
				$fh = $this->share->write($this->buildPath($path));
417
				fclose($fh);
418
				return true;
419
			}
420
			return false;
421
		} catch (ConnectException $e) {
422
			throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e);
423
		}
424
	}
425
426
	public function opendir($path) {
427
		try {
@@ 451-461 (lines=11) @@
448
		}
449
	}
450
451
	public function mkdir($path) {
452
		$path = $this->buildPath($path);
453
		try {
454
			$this->share->mkdir($path);
455
			return true;
456
		} catch (ConnectException $e) {
457
			throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e);
458
		} catch (Exception $e) {
459
			return false;
460
		}
461
	}
462
463
	public function file_exists($path) {
464
		try {