@@ -476,6 +476,9 @@ |
||
476 | 476 | } |
477 | 477 | } |
478 | 478 | |
479 | + /** |
|
480 | + * @param string|boolean $path |
|
481 | + */ |
|
479 | 482 | private function runBackgroundScanJob(callable $callback, $path) { |
480 | 483 | try { |
481 | 484 | $callback(); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | /** |
72 | 72 | * @param array $entry |
73 | - * @return array |
|
73 | + * @return string |
|
74 | 74 | */ |
75 | 75 | protected function formatCacheEntry($entry) { |
76 | 76 | if (isset($entry['path'])) { |
@@ -189,6 +189,9 @@ discard block |
||
189 | 189 | return $this->cache->getStatus($this->getSourcePath($file)); |
190 | 190 | } |
191 | 191 | |
192 | + /** |
|
193 | + * @param \OCP\Files\Cache\ICacheEntry[] $results |
|
194 | + */ |
|
192 | 195 | private function formatSearchResults($results) { |
193 | 196 | $results = array_filter($results, array($this, 'filterCacheEntry')); |
194 | 197 | $results = array_values($results); |
@@ -274,7 +277,7 @@ discard block |
||
274 | 277 | * use the one with the highest id gives the best result with the background scanner, since that is most |
275 | 278 | * likely the folder where we stopped scanning previously |
276 | 279 | * |
277 | - * @return string|bool the path of the folder or false when no folder matched |
|
280 | + * @return boolean the path of the folder or false when no folder matched |
|
278 | 281 | */ |
279 | 282 | public function getIncomplete() { |
280 | 283 | // 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 | */ |
@@ -22,8 +22,6 @@ |
||
22 | 22 | |
23 | 23 | namespace OC\Files\Config; |
24 | 24 | |
25 | -use Doctrine\DBAL\Exception\UniqueConstraintViolationException; |
|
26 | -use OC\Files\Filesystem; |
|
27 | 25 | use OCA\Files_Sharing\SharedMount; |
28 | 26 | use OCP\DB\QueryBuilder\IQueryBuilder; |
29 | 27 | use OCP\Files\Config\ICachedMountInfo; |
@@ -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 |
@@ -338,6 +338,9 @@ discard block |
||
338 | 338 | } |
339 | 339 | } |
340 | 340 | |
341 | + /** |
|
342 | + * @param string $root |
|
343 | + */ |
|
341 | 344 | static public function init($user, $root) { |
342 | 345 | if (self::$defaultInstance) { |
343 | 346 | return false; |
@@ -521,7 +524,7 @@ discard block |
||
521 | 524 | /** |
522 | 525 | * mount an \OC\Files\Storage\Storage in our virtual filesystem |
523 | 526 | * |
524 | - * @param \OC\Files\Storage\Storage|string $class |
|
527 | + * @param string $class |
|
525 | 528 | * @param array $arguments |
526 | 529 | * @param string $mountpoint |
527 | 530 | */ |
@@ -653,6 +656,9 @@ discard block |
||
653 | 656 | return self::$defaultInstance->is_dir($path); |
654 | 657 | } |
655 | 658 | |
659 | + /** |
|
660 | + * @param string $path |
|
661 | + */ |
|
656 | 662 | static public function is_file($path) { |
657 | 663 | return self::$defaultInstance->is_file($path); |
658 | 664 | } |
@@ -665,6 +671,9 @@ discard block |
||
665 | 671 | return self::$defaultInstance->filetype($path); |
666 | 672 | } |
667 | 673 | |
674 | + /** |
|
675 | + * @param string $path |
|
676 | + */ |
|
668 | 677 | static public function filesize($path) { |
669 | 678 | return self::$defaultInstance->filesize($path); |
670 | 679 | } |
@@ -677,6 +686,9 @@ discard block |
||
677 | 686 | return self::$defaultInstance->isCreatable($path); |
678 | 687 | } |
679 | 688 | |
689 | + /** |
|
690 | + * @param string $path |
|
691 | + */ |
|
680 | 692 | static public function isReadable($path) { |
681 | 693 | return self::$defaultInstance->isReadable($path); |
682 | 694 | } |
@@ -689,6 +701,9 @@ discard block |
||
689 | 701 | return self::$defaultInstance->isDeletable($path); |
690 | 702 | } |
691 | 703 | |
704 | + /** |
|
705 | + * @param string $path |
|
706 | + */ |
|
692 | 707 | static public function isSharable($path) { |
693 | 708 | return self::$defaultInstance->isSharable($path); |
694 | 709 | } |
@@ -706,6 +721,7 @@ discard block |
||
706 | 721 | } |
707 | 722 | |
708 | 723 | /** |
724 | + * @param string $path |
|
709 | 725 | * @return string |
710 | 726 | */ |
711 | 727 | static public function file_get_contents($path) { |
@@ -728,6 +744,10 @@ discard block |
||
728 | 744 | return self::$defaultInstance->copy($path1, $path2); |
729 | 745 | } |
730 | 746 | |
747 | + /** |
|
748 | + * @param string $path |
|
749 | + * @param string $mode |
|
750 | + */ |
|
731 | 751 | static public function fopen($path, $mode) { |
732 | 752 | return self::$defaultInstance->fopen($path, $mode); |
733 | 753 | } |
@@ -743,6 +763,9 @@ discard block |
||
743 | 763 | return self::$defaultInstance->fromTmpFile($tmpFile, $path); |
744 | 764 | } |
745 | 765 | |
766 | + /** |
|
767 | + * @param string $path |
|
768 | + */ |
|
746 | 769 | static public function getMimeType($path) { |
747 | 770 | return self::$defaultInstance->getMimeType($path); |
748 | 771 | } |
@@ -755,6 +778,9 @@ discard block |
||
755 | 778 | return self::$defaultInstance->free_space($path); |
756 | 779 | } |
757 | 780 | |
781 | + /** |
|
782 | + * @param string $query |
|
783 | + */ |
|
758 | 784 | static public function search($query) { |
759 | 785 | return self::$defaultInstance->search($query); |
760 | 786 | } |
@@ -868,7 +894,7 @@ discard block |
||
868 | 894 | * @param string $path |
869 | 895 | * @param boolean $includeMountPoints whether to add mountpoint sizes, |
870 | 896 | * defaults to true |
871 | - * @return \OC\Files\FileInfo|bool False if file does not exist |
|
897 | + * @return \OCP\Files\FileInfo|null False if file does not exist |
|
872 | 898 | */ |
873 | 899 | public static function getFileInfo($path, $includeMountPoints = true) { |
874 | 900 | return self::$defaultInstance->getFileInfo($path, $includeMountPoints); |
@@ -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 | } |
@@ -982,7 +982,7 @@ |
||
982 | 982 | /** |
983 | 983 | * check if path points to a files version |
984 | 984 | * |
985 | - * @param $path |
|
985 | + * @param string $path |
|
986 | 986 | * @return bool |
987 | 987 | */ |
988 | 988 | 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) { |