Code Duplication    Length = 12-13 lines in 2 locations

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

@@ 426-438 (lines=13) @@
423
		}
424
	}
425
426
	public function touch($path, $time = null) {
427
		try {
428
			if (!$this->file_exists($path)) {
429
				$fh = $this->share->write($this->buildPath($path));
430
				fclose($fh);
431
				return true;
432
			}
433
			return false;
434
		} catch (ConnectException $e) {
435
			\OC::$server->getLogger()->logException($e, ['message' => 'Error while creating file']);
436
			throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e);
437
		}
438
	}
439
440
	public function opendir($path) {
441
		try {
@@ 465-476 (lines=12) @@
462
		}
463
	}
464
465
	public function mkdir($path) {
466
		$path = $this->buildPath($path);
467
		try {
468
			$this->share->mkdir($path);
469
			return true;
470
		} catch (ConnectException $e) {
471
			\OC::$server->getLogger()->logException($e, ['message' => 'Error while creating folder']);
472
			throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e);
473
		} catch (Exception $e) {
474
			return false;
475
		}
476
	}
477
478
	public function file_exists($path) {
479
		try {