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