| @@ 496-505 (lines=10) @@ | ||
| 493 | } |
|
| 494 | } |
|
| 495 | ||
| 496 | public function isReadable($path) { |
|
| 497 | try { |
|
| 498 | $info = $this->getFileInfo($path); |
|
| 499 | return !$info->isHidden(); |
|
| 500 | } catch (NotFoundException $e) { |
|
| 501 | return false; |
|
| 502 | } catch (ForbiddenException $e) { |
|
| 503 | return false; |
|
| 504 | } |
|
| 505 | } |
|
| 506 | ||
| 507 | public function isUpdatable($path) { |
|
| 508 | try { |
|
| @@ 507-518 (lines=12) @@ | ||
| 504 | } |
|
| 505 | } |
|
| 506 | ||
| 507 | public function isUpdatable($path) { |
|
| 508 | try { |
|
| 509 | $info = $this->getFileInfo($path); |
|
| 510 | // following windows behaviour for read-only folders: they can be written into |
|
| 511 | // (https://support.microsoft.com/en-us/kb/326549 - "cause" section) |
|
| 512 | return !$info->isHidden() && (!$info->isReadOnly() || $this->is_dir($path)); |
|
| 513 | } catch (NotFoundException $e) { |
|
| 514 | return false; |
|
| 515 | } catch (ForbiddenException $e) { |
|
| 516 | return false; |
|
| 517 | } |
|
| 518 | } |
|
| 519 | ||
| 520 | public function isDeletable($path) { |
|
| 521 | try { |
|
| @@ 520-529 (lines=10) @@ | ||
| 517 | } |
|
| 518 | } |
|
| 519 | ||
| 520 | public function isDeletable($path) { |
|
| 521 | try { |
|
| 522 | $info = $this->getFileInfo($path); |
|
| 523 | return !$info->isHidden() && !$info->isReadOnly(); |
|
| 524 | } catch (NotFoundException $e) { |
|
| 525 | return false; |
|
| 526 | } catch (ForbiddenException $e) { |
|
| 527 | return false; |
|
| 528 | } |
|
| 529 | } |
|
| 530 | ||
| 531 | /** |
|
| 532 | * check if smbclient is installed |
|