@@ 656-674 (lines=19) @@ | ||
653 | return $this->leave(__FUNCTION__, $result); |
|
654 | } |
|
655 | ||
656 | public function isUpdatable($path) { |
|
657 | $this->log('enter: '.__FUNCTION__."($path)"); |
|
658 | $result = false; |
|
659 | try { |
|
660 | $info = $this->getFileInfo($path); |
|
661 | // following windows behaviour for read-only folders: they can be written into |
|
662 | // (https://support.microsoft.com/en-us/kb/326549 - "cause" section) |
|
663 | $result = !$info->isHidden() && (!$info->isReadOnly() || $this->is_dir($path)); |
|
664 | } catch (NotFoundException $e) { |
|
665 | $this->swallow(__FUNCTION__, $e); |
|
666 | } catch (ForbiddenException $e) { |
|
667 | $this->swallow(__FUNCTION__, $e); |
|
668 | } catch (Exception $e) { |
|
669 | $ex = new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
|
670 | $this->leave(__FUNCTION__, $ex); |
|
671 | throw $ex; |
|
672 | } |
|
673 | return $this->leave(__FUNCTION__, $result); |
|
674 | } |
|
675 | ||
676 | public function isDeletable($path) { |
|
677 | $this->log('enter: '.__FUNCTION__."($path)"); |
|
@@ 676-692 (lines=17) @@ | ||
673 | return $this->leave(__FUNCTION__, $result); |
|
674 | } |
|
675 | ||
676 | public function isDeletable($path) { |
|
677 | $this->log('enter: '.__FUNCTION__."($path)"); |
|
678 | $result = false; |
|
679 | try { |
|
680 | $info = $this->getFileInfo($path); |
|
681 | $result = !$info->isHidden() && !$info->isReadOnly(); |
|
682 | } catch (NotFoundException $e) { |
|
683 | $this->swallow(__FUNCTION__, $e); |
|
684 | } catch (ForbiddenException $e) { |
|
685 | $this->swallow(__FUNCTION__, $e); |
|
686 | } catch (Exception $e) { |
|
687 | $ex = new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
|
688 | $this->leave(__FUNCTION__, $ex); |
|
689 | throw $ex; |
|
690 | } |
|
691 | return $this->leave(__FUNCTION__, $result); |
|
692 | } |
|
693 | ||
694 | /** |
|
695 | * check if smbclient is installed |