@@ -110,7 +110,7 @@ |
||
110 | 110 | |
111 | 111 | /** |
112 | 112 | * Gets the correct header |
113 | - * @param Http::CONSTANT $status the constant from the Http class |
|
113 | + * @param integer $status the constant from the Http class |
|
114 | 114 | * @param \DateTime $lastModified formatted last modified date |
115 | 115 | * @param string $ETag the etag |
116 | 116 | * @return string |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | |
48 | 48 | /** |
49 | - * @param object $object an object or classname |
|
49 | + * @param \OCP\AppFramework\Controller $object an object or classname |
|
50 | 50 | * @param string $method the method which we want to inspect |
51 | 51 | */ |
52 | 52 | public function reflect($object, $method){ |
@@ -30,7 +30,6 @@ |
||
30 | 30 | use OC\Files\Filesystem; |
31 | 31 | use OC\Files\View; |
32 | 32 | use OCP\Encryption\IEncryptionModule; |
33 | -use OCP\Files\Storage; |
|
34 | 33 | use OCP\IConfig; |
35 | 34 | |
36 | 35 | class Util { |
@@ -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]); |
@@ -465,6 +465,9 @@ |
||
465 | 465 | } |
466 | 466 | } |
467 | 467 | |
468 | + /** |
|
469 | + * @param string|boolean $path |
|
470 | + */ |
|
468 | 471 | private function runBackgroundScanJob(callable $callback, $path) { |
469 | 472 | try { |
470 | 473 | $callback(); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | /** |
69 | 69 | * @param array $entry |
70 | - * @return array |
|
70 | + * @return string |
|
71 | 71 | */ |
72 | 72 | protected function formatCacheEntry($entry) { |
73 | 73 | if (isset($entry['path'])) { |
@@ -185,6 +185,9 @@ discard block |
||
185 | 185 | return $this->cache->getStatus($this->getSourcePath($file)); |
186 | 186 | } |
187 | 187 | |
188 | + /** |
|
189 | + * @param \OCP\Files\Cache\ICacheEntry[] $results |
|
190 | + */ |
|
188 | 191 | private function formatSearchResults($results) { |
189 | 192 | $results = array_filter($results, array($this, 'filterCacheEntry')); |
190 | 193 | $results = array_values($results); |
@@ -263,7 +266,7 @@ discard block |
||
263 | 266 | * use the one with the highest id gives the best result with the background scanner, since that is most |
264 | 267 | * likely the folder where we stopped scanning previously |
265 | 268 | * |
266 | - * @return string|bool the path of the folder or false when no folder matched |
|
269 | + * @return boolean the path of the folder or false when no folder matched |
|
267 | 270 | */ |
268 | 271 | public function getIncomplete() { |
269 | 272 | // not supported |
@@ -206,7 +206,7 @@ |
||
206 | 206 | } |
207 | 207 | |
208 | 208 | /** |
209 | - * @param $fileId |
|
209 | + * @param integer $fileId |
|
210 | 210 | * @return array |
211 | 211 | * @throws \OCP\Files\NotFoundException |
212 | 212 | */ |
@@ -21,14 +21,11 @@ |
||
21 | 21 | |
22 | 22 | namespace OC\Files\Config; |
23 | 23 | |
24 | -use Doctrine\DBAL\Exception\UniqueConstraintViolationException; |
|
25 | -use OC\Files\Filesystem; |
|
26 | 24 | use OCP\DB\QueryBuilder\IQueryBuilder; |
27 | 25 | use OCP\Files\Config\ICachedMountInfo; |
28 | 26 | use OCP\Files\Config\IUserMountCache; |
29 | 27 | use OCP\Files\Mount\IMountPoint; |
30 | 28 | use OCP\Files\NotFoundException; |
31 | -use OCP\ICache; |
|
32 | 29 | use OCP\IDBConnection; |
33 | 30 | use OCP\ILogger; |
34 | 31 | use OCP\IUser; |
@@ -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 |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | /** |
243 | 243 | * Returns the storage factory |
244 | 244 | * |
245 | - * @return \OCP\Files\Storage\IStorageFactory |
|
245 | + * @return \OCP\Files\Storage\IStorageFactory|null |
|
246 | 246 | */ |
247 | 247 | public static function getLoader() { |
248 | 248 | if (!self::$loader) { |
@@ -356,6 +356,10 @@ discard block |
||
356 | 356 | } |
357 | 357 | } |
358 | 358 | |
359 | + /** |
|
360 | + * @param string|boolean $user |
|
361 | + * @param string $root |
|
362 | + */ |
|
359 | 363 | static public function init($user, $root) { |
360 | 364 | if (self::$defaultInstance) { |
361 | 365 | return false; |
@@ -520,7 +524,7 @@ discard block |
||
520 | 524 | /** |
521 | 525 | * mount an \OC\Files\Storage\Storage in our virtual filesystem |
522 | 526 | * |
523 | - * @param \OC\Files\Storage\Storage|string $class |
|
527 | + * @param string $class |
|
524 | 528 | * @param array $arguments |
525 | 529 | * @param string $mountpoint |
526 | 530 | */ |
@@ -631,6 +635,7 @@ discard block |
||
631 | 635 | |
632 | 636 | /** |
633 | 637 | * following functions are equivalent to their php builtin equivalents for arguments/return values. |
638 | + * @param string $path |
|
634 | 639 | */ |
635 | 640 | static public function mkdir($path) { |
636 | 641 | return self::$defaultInstance->mkdir($path); |
@@ -652,6 +657,9 @@ discard block |
||
652 | 657 | return self::$defaultInstance->is_dir($path); |
653 | 658 | } |
654 | 659 | |
660 | + /** |
|
661 | + * @param string $path |
|
662 | + */ |
|
655 | 663 | static public function is_file($path) { |
656 | 664 | return self::$defaultInstance->is_file($path); |
657 | 665 | } |
@@ -664,6 +672,9 @@ discard block |
||
664 | 672 | return self::$defaultInstance->filetype($path); |
665 | 673 | } |
666 | 674 | |
675 | + /** |
|
676 | + * @param string $path |
|
677 | + */ |
|
667 | 678 | static public function filesize($path) { |
668 | 679 | return self::$defaultInstance->filesize($path); |
669 | 680 | } |
@@ -676,6 +687,9 @@ discard block |
||
676 | 687 | return self::$defaultInstance->isCreatable($path); |
677 | 688 | } |
678 | 689 | |
690 | + /** |
|
691 | + * @param string $path |
|
692 | + */ |
|
679 | 693 | static public function isReadable($path) { |
680 | 694 | return self::$defaultInstance->isReadable($path); |
681 | 695 | } |
@@ -688,6 +702,9 @@ discard block |
||
688 | 702 | return self::$defaultInstance->isDeletable($path); |
689 | 703 | } |
690 | 704 | |
705 | + /** |
|
706 | + * @param string $path |
|
707 | + */ |
|
691 | 708 | static public function isSharable($path) { |
692 | 709 | return self::$defaultInstance->isSharable($path); |
693 | 710 | } |
@@ -705,6 +722,7 @@ discard block |
||
705 | 722 | } |
706 | 723 | |
707 | 724 | /** |
725 | + * @param string $path |
|
708 | 726 | * @return string |
709 | 727 | */ |
710 | 728 | static public function file_get_contents($path) { |
@@ -727,6 +745,10 @@ discard block |
||
727 | 745 | return self::$defaultInstance->copy($path1, $path2); |
728 | 746 | } |
729 | 747 | |
748 | + /** |
|
749 | + * @param string $path |
|
750 | + * @param string $mode |
|
751 | + */ |
|
730 | 752 | static public function fopen($path, $mode) { |
731 | 753 | return self::$defaultInstance->fopen($path, $mode); |
732 | 754 | } |
@@ -742,6 +764,9 @@ discard block |
||
742 | 764 | return self::$defaultInstance->fromTmpFile($tmpFile, $path); |
743 | 765 | } |
744 | 766 | |
767 | + /** |
|
768 | + * @param string $path |
|
769 | + */ |
|
745 | 770 | static public function getMimeType($path) { |
746 | 771 | return self::$defaultInstance->getMimeType($path); |
747 | 772 | } |
@@ -754,6 +779,9 @@ discard block |
||
754 | 779 | return self::$defaultInstance->free_space($path); |
755 | 780 | } |
756 | 781 | |
782 | + /** |
|
783 | + * @param string $query |
|
784 | + */ |
|
757 | 785 | static public function search($query) { |
758 | 786 | return self::$defaultInstance->search($query); |
759 | 787 | } |
@@ -862,7 +890,7 @@ discard block |
||
862 | 890 | * @param string $path |
863 | 891 | * @param boolean $includeMountPoints whether to add mountpoint sizes, |
864 | 892 | * defaults to true |
865 | - * @return \OC\Files\FileInfo|bool False if file does not exist |
|
893 | + * @return \OCP\Files\FileInfo|null False if file does not exist |
|
866 | 894 | */ |
867 | 895 | public static function getFileInfo($path, $includeMountPoints = true) { |
868 | 896 | 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 |