Code Duplication    Length = 11-12 lines in 2 locations

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

@@ 394-405 (lines=12) @@
391
		}
392
	}
393
394
	public function touch($path, $time = null) {
395
		try {
396
			if (!$this->file_exists($path)) {
397
				$fh = $this->share->write($this->buildPath($path));
398
				fclose($fh);
399
				return true;
400
			}
401
			return false;
402
		} catch (ConnectException $e) {
403
			throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e);
404
		}
405
	}
406
407
	public function opendir($path) {
408
		try {
@@ 432-442 (lines=11) @@
429
		}
430
	}
431
432
	public function mkdir($path) {
433
		$path = $this->buildPath($path);
434
		try {
435
			$this->share->mkdir($path);
436
			return true;
437
		} catch (ConnectException $e) {
438
			throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e);
439
		} catch (Exception $e) {
440
			return false;
441
		}
442
	}
443
444
	public function file_exists($path) {
445
		try {