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