@@ -88,7 +88,7 @@ |
||
| 88 | 88 | * send a message to the client |
| 89 | 89 | * |
| 90 | 90 | * @param string $type |
| 91 | - * @param mixed $data |
|
| 91 | + * @param string $data |
|
| 92 | 92 | * |
| 93 | 93 | * @throws \BadMethodCallException |
| 94 | 94 | * if only one parameter is given, a typeless message will be send with that parameter as data |
@@ -185,7 +185,7 @@ |
||
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | /** |
| 188 | - * @return \OCP\Files\FileInfo::TYPE_FILE|\OCP\Files\FileInfo::TYPE_FOLDER |
|
| 188 | + * @return string |
|
| 189 | 189 | */ |
| 190 | 190 | public function getType() { |
| 191 | 191 | if (!isset($this->data['type'])) { |
@@ -58,7 +58,6 @@ |
||
| 58 | 58 | |
| 59 | 59 | namespace OC\Files; |
| 60 | 60 | |
| 61 | -use OC\Cache\File; |
|
| 62 | 61 | use OC\Files\Config\MountProviderCollection; |
| 63 | 62 | use OC\Files\Storage\StorageFactory; |
| 64 | 63 | use OCP\Files\Config\IMountProvider; |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | /** |
| 222 | 222 | * Returns the storage factory |
| 223 | 223 | * |
| 224 | - * @return \OCP\Files\Storage\IStorageFactory |
|
| 224 | + * @return \OCP\Files\Storage\IStorageFactory|null |
|
| 225 | 225 | */ |
| 226 | 226 | public static function getLoader() { |
| 227 | 227 | if (!self::$loader) { |
@@ -335,6 +335,9 @@ discard block |
||
| 335 | 335 | } |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | + /** |
|
| 339 | + * @param string $root |
|
| 340 | + */ |
|
| 338 | 341 | static public function init($user, $root) { |
| 339 | 342 | if (self::$defaultInstance) { |
| 340 | 343 | return false; |
@@ -623,11 +626,15 @@ discard block |
||
| 623 | 626 | |
| 624 | 627 | /** |
| 625 | 628 | * following functions are equivalent to their php builtin equivalents for arguments/return values. |
| 629 | + * @param string $path |
|
| 626 | 630 | */ |
| 627 | 631 | static public function mkdir($path) { |
| 628 | 632 | return self::$defaultInstance->mkdir($path); |
| 629 | 633 | } |
| 630 | 634 | |
| 635 | + /** |
|
| 636 | + * @param string $path |
|
| 637 | + */ |
|
| 631 | 638 | static public function rmdir($path) { |
| 632 | 639 | return self::$defaultInstance->rmdir($path); |
| 633 | 640 | } |
@@ -640,10 +647,16 @@ discard block |
||
| 640 | 647 | return self::$defaultInstance->readdir($path); |
| 641 | 648 | } |
| 642 | 649 | |
| 650 | + /** |
|
| 651 | + * @param string|null $path |
|
| 652 | + */ |
|
| 643 | 653 | static public function is_dir($path) { |
| 644 | 654 | return self::$defaultInstance->is_dir($path); |
| 645 | 655 | } |
| 646 | 656 | |
| 657 | + /** |
|
| 658 | + * @param string $path |
|
| 659 | + */ |
|
| 647 | 660 | static public function is_file($path) { |
| 648 | 661 | return self::$defaultInstance->is_file($path); |
| 649 | 662 | } |
@@ -656,10 +669,16 @@ discard block |
||
| 656 | 669 | return self::$defaultInstance->filetype($path); |
| 657 | 670 | } |
| 658 | 671 | |
| 672 | + /** |
|
| 673 | + * @param string $path |
|
| 674 | + */ |
|
| 659 | 675 | static public function filesize($path) { |
| 660 | 676 | return self::$defaultInstance->filesize($path); |
| 661 | 677 | } |
| 662 | 678 | |
| 679 | + /** |
|
| 680 | + * @param string $path |
|
| 681 | + */ |
|
| 663 | 682 | static public function readfile($path) { |
| 664 | 683 | return self::$defaultInstance->readfile($path); |
| 665 | 684 | } |
@@ -668,6 +687,9 @@ discard block |
||
| 668 | 687 | return self::$defaultInstance->isCreatable($path); |
| 669 | 688 | } |
| 670 | 689 | |
| 690 | + /** |
|
| 691 | + * @param string $path |
|
| 692 | + */ |
|
| 671 | 693 | static public function isReadable($path) { |
| 672 | 694 | return self::$defaultInstance->isReadable($path); |
| 673 | 695 | } |
@@ -680,6 +702,9 @@ discard block |
||
| 680 | 702 | return self::$defaultInstance->isDeletable($path); |
| 681 | 703 | } |
| 682 | 704 | |
| 705 | + /** |
|
| 706 | + * @param string $path |
|
| 707 | + */ |
|
| 683 | 708 | static public function isSharable($path) { |
| 684 | 709 | return self::$defaultInstance->isSharable($path); |
| 685 | 710 | } |
@@ -692,33 +717,57 @@ discard block |
||
| 692 | 717 | return self::$defaultInstance->filemtime($path); |
| 693 | 718 | } |
| 694 | 719 | |
| 720 | + /** |
|
| 721 | + * @param string $path |
|
| 722 | + * @param integer $mtime |
|
| 723 | + */ |
|
| 695 | 724 | static public function touch($path, $mtime = null) { |
| 696 | 725 | return self::$defaultInstance->touch($path, $mtime); |
| 697 | 726 | } |
| 698 | 727 | |
| 699 | 728 | /** |
| 729 | + * @param string $path |
|
| 700 | 730 | * @return string |
| 701 | 731 | */ |
| 702 | 732 | static public function file_get_contents($path) { |
| 703 | 733 | return self::$defaultInstance->file_get_contents($path); |
| 704 | 734 | } |
| 705 | 735 | |
| 736 | + /** |
|
| 737 | + * @param string $path |
|
| 738 | + * @param string $data |
|
| 739 | + */ |
|
| 706 | 740 | static public function file_put_contents($path, $data) { |
| 707 | 741 | return self::$defaultInstance->file_put_contents($path, $data); |
| 708 | 742 | } |
| 709 | 743 | |
| 744 | + /** |
|
| 745 | + * @param string $path |
|
| 746 | + */ |
|
| 710 | 747 | static public function unlink($path) { |
| 711 | 748 | return self::$defaultInstance->unlink($path); |
| 712 | 749 | } |
| 713 | 750 | |
| 751 | + /** |
|
| 752 | + * @param string $path1 |
|
| 753 | + * @param string $path2 |
|
| 754 | + */ |
|
| 714 | 755 | static public function rename($path1, $path2) { |
| 715 | 756 | return self::$defaultInstance->rename($path1, $path2); |
| 716 | 757 | } |
| 717 | 758 | |
| 759 | + /** |
|
| 760 | + * @param string $path1 |
|
| 761 | + * @param string $path2 |
|
| 762 | + */ |
|
| 718 | 763 | static public function copy($path1, $path2) { |
| 719 | 764 | return self::$defaultInstance->copy($path1, $path2); |
| 720 | 765 | } |
| 721 | 766 | |
| 767 | + /** |
|
| 768 | + * @param string|null $path |
|
| 769 | + * @param string $mode |
|
| 770 | + */ |
|
| 722 | 771 | static public function fopen($path, $mode) { |
| 723 | 772 | return self::$defaultInstance->fopen($path, $mode); |
| 724 | 773 | } |
@@ -734,6 +783,9 @@ discard block |
||
| 734 | 783 | return self::$defaultInstance->fromTmpFile($tmpFile, $path); |
| 735 | 784 | } |
| 736 | 785 | |
| 786 | + /** |
|
| 787 | + * @param string $path |
|
| 788 | + */ |
|
| 737 | 789 | static public function getMimeType($path) { |
| 738 | 790 | return self::$defaultInstance->getMimeType($path); |
| 739 | 791 | } |
@@ -746,6 +798,9 @@ discard block |
||
| 746 | 798 | return self::$defaultInstance->free_space($path); |
| 747 | 799 | } |
| 748 | 800 | |
| 801 | + /** |
|
| 802 | + * @param string $query |
|
| 803 | + */ |
|
| 749 | 804 | static public function search($query) { |
| 750 | 805 | return self::$defaultInstance->search($query); |
| 751 | 806 | } |
@@ -195,7 +195,7 @@ |
||
| 195 | 195 | /** |
| 196 | 196 | * search for files by tag |
| 197 | 197 | * |
| 198 | - * @param string|int $tag name or tag id |
|
| 198 | + * @param string $tag name or tag id |
|
| 199 | 199 | * @param string $userId owner of the tags |
| 200 | 200 | * @return Node[] |
| 201 | 201 | */ |
@@ -169,7 +169,7 @@ |
||
| 169 | 169 | * @param string $path |
| 170 | 170 | * @throws \OCP\Files\NotFoundException |
| 171 | 171 | * @throws \OCP\Files\NotPermittedException |
| 172 | - * @return \OCP\Files\Node |
|
| 172 | + * @return string |
|
| 173 | 173 | */ |
| 174 | 174 | public function get($path) { |
| 175 | 175 | $path = $this->normalizePath($path); |
@@ -175,7 +175,7 @@ |
||
| 175 | 175 | * |
| 176 | 176 | * @param resource $source |
| 177 | 177 | * @param string $mode |
| 178 | - * @param array $context |
|
| 178 | + * @param resource $context |
|
| 179 | 179 | * @param string $protocol |
| 180 | 180 | * @param string $class |
| 181 | 181 | * @return resource |
@@ -144,6 +144,9 @@ |
||
| 144 | 144 | return true; |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | + /** |
|
| 148 | + * @param string $path |
|
| 149 | + */ |
|
| 147 | 150 | public function url_stat($path) { |
| 148 | 151 | if (isset(self::$data[$path])) { |
| 149 | 152 | $size = strlen(self::$data[$path]); |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | * Removes a user from a group |
| 107 | 107 | * @param string $uid Name of the user to remove from group |
| 108 | 108 | * @param string $gid Name of the group from which remove the user |
| 109 | - * @return bool |
|
| 109 | + * @return null|false |
|
| 110 | 110 | * |
| 111 | 111 | * removes the user from a group. |
| 112 | 112 | */ |
@@ -144,6 +144,9 @@ |
||
| 144 | 144 | return $this->getGroupObject($gid); |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | + /** |
|
| 148 | + * @param string $gid |
|
| 149 | + */ |
|
| 147 | 150 | protected function getGroupObject($gid) { |
| 148 | 151 | $backends = array(); |
| 149 | 152 | foreach ($this->backends as $backend) { |