@@ -386,6 +386,14 @@ discard block |
||
| 386 | 386 | return $size; |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | + /** |
|
| 390 | + * @param string $path |
|
| 391 | + * @param boolean $recursive |
|
| 392 | + * @param integer $reuse |
|
| 393 | + * @param integer|null $folderId |
|
| 394 | + * @param boolean $lock |
|
| 395 | + * @param integer $size |
|
| 396 | + */ |
|
| 389 | 397 | private function handleChildren($path, $recursive, $reuse, $folderId, $lock, &$size) { |
| 390 | 398 | // we put this in it's own function so it cleans up the memory before we start recursing |
| 391 | 399 | $existingChildren = $this->getExistingChildren($folderId); |
@@ -485,6 +493,9 @@ discard block |
||
| 485 | 493 | } |
| 486 | 494 | } |
| 487 | 495 | |
| 496 | + /** |
|
| 497 | + * @param string|boolean $path |
|
| 498 | + */ |
|
| 488 | 499 | private function runBackgroundScanJob(callable $callback, $path) { |
| 489 | 500 | try { |
| 490 | 501 | $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 | */ |
@@ -23,15 +23,12 @@ |
||
| 23 | 23 | |
| 24 | 24 | namespace OC\Files\Config; |
| 25 | 25 | |
| 26 | -use Doctrine\DBAL\Exception\UniqueConstraintViolationException; |
|
| 27 | -use OC\Files\Filesystem; |
|
| 28 | 26 | use OCA\Files_Sharing\SharedMount; |
| 29 | 27 | use OCP\DB\QueryBuilder\IQueryBuilder; |
| 30 | 28 | use OCP\Files\Config\ICachedMountInfo; |
| 31 | 29 | use OCP\Files\Config\IUserMountCache; |
| 32 | 30 | use OCP\Files\Mount\IMountPoint; |
| 33 | 31 | use OCP\Files\NotFoundException; |
| 34 | -use OCP\ICache; |
|
| 35 | 32 | use OCP\IDBConnection; |
| 36 | 33 | use OCP\ILogger; |
| 37 | 34 | use OCP\IUser; |
@@ -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 | */ |
@@ -605,6 +608,7 @@ discard block |
||
| 605 | 608 | |
| 606 | 609 | /** |
| 607 | 610 | * following functions are equivalent to their php builtin equivalents for arguments/return values. |
| 611 | + * @param string $path |
|
| 608 | 612 | */ |
| 609 | 613 | static public function mkdir($path) { |
| 610 | 614 | return self::$defaultInstance->mkdir($path); |
@@ -626,6 +630,9 @@ discard block |
||
| 626 | 630 | return self::$defaultInstance->is_dir($path); |
| 627 | 631 | } |
| 628 | 632 | |
| 633 | + /** |
|
| 634 | + * @param string $path |
|
| 635 | + */ |
|
| 629 | 636 | static public function is_file($path) { |
| 630 | 637 | return self::$defaultInstance->is_file($path); |
| 631 | 638 | } |
@@ -638,6 +645,9 @@ discard block |
||
| 638 | 645 | return self::$defaultInstance->filetype($path); |
| 639 | 646 | } |
| 640 | 647 | |
| 648 | + /** |
|
| 649 | + * @param string $path |
|
| 650 | + */ |
|
| 641 | 651 | static public function filesize($path) { |
| 642 | 652 | return self::$defaultInstance->filesize($path); |
| 643 | 653 | } |
@@ -650,6 +660,9 @@ discard block |
||
| 650 | 660 | return self::$defaultInstance->isCreatable($path); |
| 651 | 661 | } |
| 652 | 662 | |
| 663 | + /** |
|
| 664 | + * @param string $path |
|
| 665 | + */ |
|
| 653 | 666 | static public function isReadable($path) { |
| 654 | 667 | return self::$defaultInstance->isReadable($path); |
| 655 | 668 | } |
@@ -662,6 +675,9 @@ discard block |
||
| 662 | 675 | return self::$defaultInstance->isDeletable($path); |
| 663 | 676 | } |
| 664 | 677 | |
| 678 | + /** |
|
| 679 | + * @param string $path |
|
| 680 | + */ |
|
| 665 | 681 | static public function isSharable($path) { |
| 666 | 682 | return self::$defaultInstance->isSharable($path); |
| 667 | 683 | } |
@@ -679,6 +695,7 @@ discard block |
||
| 679 | 695 | } |
| 680 | 696 | |
| 681 | 697 | /** |
| 698 | + * @param string $path |
|
| 682 | 699 | * @return string |
| 683 | 700 | */ |
| 684 | 701 | static public function file_get_contents($path) { |
@@ -701,6 +718,10 @@ discard block |
||
| 701 | 718 | return self::$defaultInstance->copy($path1, $path2); |
| 702 | 719 | } |
| 703 | 720 | |
| 721 | + /** |
|
| 722 | + * @param string $path |
|
| 723 | + * @param string $mode |
|
| 724 | + */ |
|
| 704 | 725 | static public function fopen($path, $mode) { |
| 705 | 726 | return self::$defaultInstance->fopen($path, $mode); |
| 706 | 727 | } |
@@ -716,6 +737,9 @@ discard block |
||
| 716 | 737 | return self::$defaultInstance->fromTmpFile($tmpFile, $path); |
| 717 | 738 | } |
| 718 | 739 | |
| 740 | + /** |
|
| 741 | + * @param string $path |
|
| 742 | + */ |
|
| 719 | 743 | static public function getMimeType($path) { |
| 720 | 744 | return self::$defaultInstance->getMimeType($path); |
| 721 | 745 | } |
@@ -728,6 +752,9 @@ discard block |
||
| 728 | 752 | return self::$defaultInstance->free_space($path); |
| 729 | 753 | } |
| 730 | 754 | |
| 755 | + /** |
|
| 756 | + * @param string $query |
|
| 757 | + */ |
|
| 731 | 758 | static public function search($query) { |
| 732 | 759 | return self::$defaultInstance->search($query); |
| 733 | 760 | } |
@@ -836,7 +863,7 @@ discard block |
||
| 836 | 863 | * @param string $path |
| 837 | 864 | * @param boolean $includeMountPoints whether to add mountpoint sizes, |
| 838 | 865 | * defaults to true |
| 839 | - * @return \OC\Files\FileInfo|bool False if file does not exist |
|
| 866 | + * @return \OCP\Files\FileInfo|null False if file does not exist |
|
| 840 | 867 | */ |
| 841 | 868 | public static function getFileInfo($path, $includeMountPoints = true) { |
| 842 | 869 | return self::$defaultInstance->getFileInfo($path, $includeMountPoints); |
@@ -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 | |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | * Magic method to first get the real rootFolder and then |
| 53 | 53 | * call $method with $args on it |
| 54 | 54 | * |
| 55 | - * @param $method |
|
| 55 | + * @param string $method |
|
| 56 | 56 | * @param $args |
| 57 | 57 | * @return mixed |
| 58 | 58 | */ |
@@ -20,9 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | namespace OC\Files\Node; |
| 22 | 22 | |
| 23 | -use OC\Files\Mount\MountPoint; |
|
| 24 | 23 | use OCP\Files\IRootFolder; |
| 25 | -use OCP\Files\NotPermittedException; |
|
| 26 | 24 | |
| 27 | 25 | /** |
| 28 | 26 | * Class LazyRoot |
@@ -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) { |
@@ -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]); |