@@ -62,7 +62,6 @@ |
||
| 62 | 62 | use OC\Files\Mount\MountPoint; |
| 63 | 63 | use OC\Files\Storage\StorageFactory; |
| 64 | 64 | use OCP\Files\Config\IMountProvider; |
| 65 | -use OCP\Files\Mount\IMountPoint; |
|
| 66 | 65 | use OCP\Files\NotFoundException; |
| 67 | 66 | use OCP\IUserManager; |
| 68 | 67 | |
@@ -355,6 +355,9 @@ discard block |
||
| 355 | 355 | } |
| 356 | 356 | } |
| 357 | 357 | |
| 358 | + /** |
|
| 359 | + * @param string $root |
|
| 360 | + */ |
|
| 358 | 361 | static public function init($user, $root) { |
| 359 | 362 | if (self::$defaultInstance) { |
| 360 | 363 | return false; |
@@ -494,7 +497,7 @@ discard block |
||
| 494 | 497 | /** |
| 495 | 498 | * mount an \OC\Files\Storage\Storage in our virtual filesystem |
| 496 | 499 | * |
| 497 | - * @param \OC\Files\Storage\Storage|string $class |
|
| 500 | + * @param string $class |
|
| 498 | 501 | * @param array $arguments |
| 499 | 502 | * @param string $mountpoint |
| 500 | 503 | */ |
@@ -626,6 +629,9 @@ discard block |
||
| 626 | 629 | return self::$defaultInstance->is_dir($path); |
| 627 | 630 | } |
| 628 | 631 | |
| 632 | + /** |
|
| 633 | + * @param string $path |
|
| 634 | + */ |
|
| 629 | 635 | static public function is_file($path) { |
| 630 | 636 | return self::$defaultInstance->is_file($path); |
| 631 | 637 | } |
@@ -638,6 +644,9 @@ discard block |
||
| 638 | 644 | return self::$defaultInstance->filetype($path); |
| 639 | 645 | } |
| 640 | 646 | |
| 647 | + /** |
|
| 648 | + * @param string $path |
|
| 649 | + */ |
|
| 641 | 650 | static public function filesize($path) { |
| 642 | 651 | return self::$defaultInstance->filesize($path); |
| 643 | 652 | } |
@@ -650,6 +659,9 @@ discard block |
||
| 650 | 659 | return self::$defaultInstance->isCreatable($path); |
| 651 | 660 | } |
| 652 | 661 | |
| 662 | + /** |
|
| 663 | + * @param string $path |
|
| 664 | + */ |
|
| 653 | 665 | static public function isReadable($path) { |
| 654 | 666 | return self::$defaultInstance->isReadable($path); |
| 655 | 667 | } |
@@ -662,6 +674,9 @@ discard block |
||
| 662 | 674 | return self::$defaultInstance->isDeletable($path); |
| 663 | 675 | } |
| 664 | 676 | |
| 677 | + /** |
|
| 678 | + * @param string $path |
|
| 679 | + */ |
|
| 665 | 680 | static public function isSharable($path) { |
| 666 | 681 | return self::$defaultInstance->isSharable($path); |
| 667 | 682 | } |
@@ -679,6 +694,7 @@ discard block |
||
| 679 | 694 | } |
| 680 | 695 | |
| 681 | 696 | /** |
| 697 | + * @param string $path |
|
| 682 | 698 | * @return string |
| 683 | 699 | */ |
| 684 | 700 | static public function file_get_contents($path) { |
@@ -701,6 +717,10 @@ discard block |
||
| 701 | 717 | return self::$defaultInstance->copy($path1, $path2); |
| 702 | 718 | } |
| 703 | 719 | |
| 720 | + /** |
|
| 721 | + * @param string $path |
|
| 722 | + * @param string $mode |
|
| 723 | + */ |
|
| 704 | 724 | static public function fopen($path, $mode) { |
| 705 | 725 | return self::$defaultInstance->fopen($path, $mode); |
| 706 | 726 | } |
@@ -716,6 +736,9 @@ discard block |
||
| 716 | 736 | return self::$defaultInstance->fromTmpFile($tmpFile, $path); |
| 717 | 737 | } |
| 718 | 738 | |
| 739 | + /** |
|
| 740 | + * @param string $path |
|
| 741 | + */ |
|
| 719 | 742 | static public function getMimeType($path) { |
| 720 | 743 | return self::$defaultInstance->getMimeType($path); |
| 721 | 744 | } |
@@ -728,6 +751,9 @@ discard block |
||
| 728 | 751 | return self::$defaultInstance->free_space($path); |
| 729 | 752 | } |
| 730 | 753 | |
| 754 | + /** |
|
| 755 | + * @param string $query |
|
| 756 | + */ |
|
| 731 | 757 | static public function search($query) { |
| 732 | 758 | return self::$defaultInstance->search($query); |
| 733 | 759 | } |
@@ -836,7 +862,7 @@ discard block |
||
| 836 | 862 | * @param string $path |
| 837 | 863 | * @param boolean $includeMountPoints whether to add mountpoint sizes, |
| 838 | 864 | * defaults to true |
| 839 | - * @return \OC\Files\FileInfo|bool False if file does not exist |
|
| 865 | + * @return \OCP\Files\FileInfo|null False if file does not exist |
|
| 840 | 866 | */ |
| 841 | 867 | public static function getFileInfo($path, $includeMountPoints = true) { |
| 842 | 868 | return self::$defaultInstance->getFileInfo($path, $includeMountPoints); |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | * Magic method to first get the real rootFolder and then |
| 35 | 35 | * call $method with $args on it |
| 36 | 36 | * |
| 37 | - * @param $method |
|
| 37 | + * @param string $method |
|
| 38 | 38 | * @param $args |
| 39 | 39 | * @return mixed |
| 40 | 40 | */ |
@@ -2,9 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace OC\Files\Node; |
| 4 | 4 | |
| 5 | -use OC\Files\Mount\MountPoint; |
|
| 6 | 5 | use OCP\Files\IRootFolder; |
| 7 | -use OCP\Files\NotPermittedException; |
|
| 8 | 6 | |
| 9 | 7 | /** |
| 10 | 8 | * Class LazyRoot |
@@ -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]); |
@@ -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]); |
@@ -99,6 +99,7 @@ discard block |
||
| 99 | 99 | * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
| 100 | 100 | * @param \OCP\Lock\ILockingProvider $provider |
| 101 | 101 | * @throws \OCP\Lock\LockedException |
| 102 | + * @return void |
|
| 102 | 103 | */ |
| 103 | 104 | public function acquireLock($path, $type, ILockingProvider $provider); |
| 104 | 105 | |
@@ -106,6 +107,7 @@ discard block |
||
| 106 | 107 | * @param string $path The path of the file to release the lock for |
| 107 | 108 | * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
| 108 | 109 | * @param \OCP\Lock\ILockingProvider $provider |
| 110 | + * @return void |
|
| 109 | 111 | */ |
| 110 | 112 | public function releaseLock($path, $type, ILockingProvider $provider); |
| 111 | 113 | |
@@ -114,6 +116,7 @@ discard block |
||
| 114 | 116 | * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
| 115 | 117 | * @param \OCP\Lock\ILockingProvider $provider |
| 116 | 118 | * @throws \OCP\Lock\LockedException |
| 119 | + * @return void |
|
| 117 | 120 | */ |
| 118 | 121 | public function changeLock($path, $type, ILockingProvider $provider); |
| 119 | 122 | } |
@@ -777,7 +777,7 @@ |
||
| 777 | 777 | /** |
| 778 | 778 | * check if path points to a files version |
| 779 | 779 | * |
| 780 | - * @param $path |
|
| 780 | + * @param string $path |
|
| 781 | 781 | * @return bool |
| 782 | 782 | */ |
| 783 | 783 | protected function isVersion($path) { |
@@ -159,7 +159,7 @@ |
||
| 159 | 159 | * Checks whether the given path is a part file |
| 160 | 160 | * |
| 161 | 161 | * @param string $path Path that may identify a .part file |
| 162 | - * @return string File path without .part extension |
|
| 162 | + * @return boolean File path without .part extension |
|
| 163 | 163 | * @note this is needed for reusing keys |
| 164 | 164 | */ |
| 165 | 165 | private function isPartFile($path) { |
@@ -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]); |
@@ -27,7 +27,6 @@ |
||
| 27 | 27 | use OCP\IUser; |
| 28 | 28 | use OCP\ILogger; |
| 29 | 29 | use OCP\Files\Folder; |
| 30 | - |
|
| 31 | 30 | use OC\Share20\Exception\ShareNotFound; |
| 32 | 31 | |
| 33 | 32 | /** |