Code Duplication    Length = 12-13 lines in 2 locations

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

@@ 440-452 (lines=13) @@
437
		}
438
	}
439
440
	public function touch($path, $time = null) {
441
		try {
442
			if (!$this->file_exists($path)) {
443
				$fh = $this->share->write($this->buildPath($path));
444
				fclose($fh);
445
				return true;
446
			}
447
			return false;
448
		} catch (ConnectException $e) {
449
			\OC::$server->getLogger()->logException($e, ['message' => 'Error while creating file']);
450
			throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e);
451
		}
452
	}
453
454
	public function opendir($path) {
455
		try {
@@ 479-490 (lines=12) @@
476
		}
477
	}
478
479
	public function mkdir($path) {
480
		$path = $this->buildPath($path);
481
		try {
482
			$this->share->mkdir($path);
483
			return true;
484
		} catch (ConnectException $e) {
485
			\OC::$server->getLogger()->logException($e, ['message' => 'Error while creating folder']);
486
			throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e);
487
		} catch (Exception $e) {
488
			return false;
489
		}
490
	}
491
492
	public function file_exists($path) {
493
		try {