| @@ 457-466 (lines=10) @@ | ||
| 454 | } |
|
| 455 | } |
|
| 456 | ||
| 457 | public function isReadable($path) { |
|
| 458 | try { |
|
| 459 | $info = $this->getFileInfo($path); |
|
| 460 | return !$info->isHidden(); |
|
| 461 | } catch (NotFoundException $e) { |
|
| 462 | return false; |
|
| 463 | } catch (ForbiddenException $e) { |
|
| 464 | return false; |
|
| 465 | } |
|
| 466 | } |
|
| 467 | ||
| 468 | public function isUpdatable($path) { |
|
| 469 | try { |
|
| @@ 468-479 (lines=12) @@ | ||
| 465 | } |
|
| 466 | } |
|
| 467 | ||
| 468 | public function isUpdatable($path) { |
|
| 469 | try { |
|
| 470 | $info = $this->getFileInfo($path); |
|
| 471 | // following windows behaviour for read-only folders: they can be written into |
|
| 472 | // (https://support.microsoft.com/en-us/kb/326549 - "cause" section) |
|
| 473 | return !$info->isHidden() && (!$info->isReadOnly() || $this->is_dir($path)); |
|
| 474 | } catch (NotFoundException $e) { |
|
| 475 | return false; |
|
| 476 | } catch (ForbiddenException $e) { |
|
| 477 | return false; |
|
| 478 | } |
|
| 479 | } |
|
| 480 | ||
| 481 | public function isDeletable($path) { |
|
| 482 | try { |
|
| @@ 481-490 (lines=10) @@ | ||
| 478 | } |
|
| 479 | } |
|
| 480 | ||
| 481 | public function isDeletable($path) { |
|
| 482 | try { |
|
| 483 | $info = $this->getFileInfo($path); |
|
| 484 | return !$info->isHidden() && !$info->isReadOnly(); |
|
| 485 | } catch (NotFoundException $e) { |
|
| 486 | return false; |
|
| 487 | } catch (ForbiddenException $e) { |
|
| 488 | return false; |
|
| 489 | } |
|
| 490 | } |
|
| 491 | ||
| 492 | /** |
|
| 493 | * check if smbclient is installed |
|