Code Duplication    Length = 10-12 lines in 3 locations

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

@@ 386-395 (lines=10) @@
383
		}
384
	}
385
386
	public function isReadable($path) {
387
		try {
388
			$info = $this->getFileInfo($path);
389
			return !$info->isHidden();
390
		} catch (NotFoundException $e) {
391
			return false;
392
		} catch (ForbiddenException $e) {
393
			return false;
394
		}
395
	}
396
397
	public function isUpdatable($path) {
398
		try {
@@ 397-408 (lines=12) @@
394
		}
395
	}
396
397
	public function isUpdatable($path) {
398
		try {
399
			$info = $this->getFileInfo($path);
400
			// following windows behaviour for read-only folders: they can be written into
401
			// (https://support.microsoft.com/en-us/kb/326549 - "cause" section)
402
			return !$info->isHidden() && (!$info->isReadOnly() || $this->is_dir($path));
403
		} catch (NotFoundException $e) {
404
			return false;
405
		} catch (ForbiddenException $e) {
406
			return false;
407
		}
408
	}
409
410
	public function isDeletable($path) {
411
		try {
@@ 410-419 (lines=10) @@
407
		}
408
	}
409
410
	public function isDeletable($path) {
411
		try {
412
			$info = $this->getFileInfo($path);
413
			return !$info->isHidden() && !$info->isReadOnly();
414
		} catch (NotFoundException $e) {
415
			return false;
416
		} catch (ForbiddenException $e) {
417
			return false;
418
		}
419
	}
420
421
	/**
422
	 * check if smbclient is installed