Code Duplication    Length = 11-12 lines in 2 locations

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

@@ 323-334 (lines=12) @@
320
		}
321
	}
322
323
	public function touch($path, $time = null) {
324
		try {
325
			if (!$this->file_exists($path)) {
326
				$fh = $this->share->write($this->buildPath($path));
327
				fclose($fh);
328
				return true;
329
			}
330
			return false;
331
		} catch (ConnectException $e) {
332
			throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e);
333
		}
334
	}
335
336
	public function opendir($path) {
337
		try {
@@ 361-371 (lines=11) @@
358
		}
359
	}
360
361
	public function mkdir($path) {
362
		$path = $this->buildPath($path);
363
		try {
364
			$this->share->mkdir($path);
365
			return true;
366
		} catch (ConnectException $e) {
367
			throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e);
368
		} catch (Exception $e) {
369
			return false;
370
		}
371
	}
372
373
	public function file_exists($path) {
374
		try {