@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | * If an SQLLogger is configured, the execution is logged. |
| 174 | 174 | * |
| 175 | 175 | * @param string $query The SQL query to execute. |
| 176 | - * @param array $params The parameters to bind to the query, if any. |
|
| 176 | + * @param string[] $params The parameters to bind to the query, if any. |
|
| 177 | 177 | * @param array $types The types the previous parameters are in. |
| 178 | 178 | * @param \Doctrine\DBAL\Cache\QueryCacheProfile|null $qcp The query cache profile, optional. |
| 179 | 179 | * |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | * columns or sequences. |
| 219 | 219 | * |
| 220 | 220 | * @param string $seqName Name of the sequence object from which the ID should be returned. |
| 221 | - * @return string A string representation of the last inserted ID. |
|
| 221 | + * @return integer A string representation of the last inserted ID. |
|
| 222 | 222 | */ |
| 223 | 223 | public function lastInsertId($seqName = null) { |
| 224 | 224 | if ($seqName) { |
@@ -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 { |
@@ -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(); |
@@ -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 | */ |
@@ -24,14 +24,11 @@ |
||
| 24 | 24 | |
| 25 | 25 | namespace OC\Files\Config; |
| 26 | 26 | |
| 27 | -use Doctrine\DBAL\Exception\UniqueConstraintViolationException; |
|
| 28 | -use OC\Files\Filesystem; |
|
| 29 | 27 | use OCA\Files_Sharing\SharedMount; |
| 30 | 28 | use OCP\DB\QueryBuilder\IQueryBuilder; |
| 31 | 29 | use OCP\Files\Config\ICachedMountInfo; |
| 32 | 30 | use OCP\Files\Config\IUserMountCache; |
| 33 | 31 | use OCP\Files\Mount\IMountPoint; |
| 34 | -use OCP\Files\Node; |
|
| 35 | 32 | use OCP\Files\NotFoundException; |
| 36 | 33 | use OCP\ICache; |
| 37 | 34 | use OCP\IDBConnection; |
@@ -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 | |
@@ -360,6 +360,9 @@ discard block |
||
| 360 | 360 | } |
| 361 | 361 | } |
| 362 | 362 | |
| 363 | + /** |
|
| 364 | + * @param string $root |
|
| 365 | + */ |
|
| 363 | 366 | static public function init($user, $root) { |
| 364 | 367 | if (self::$defaultInstance) { |
| 365 | 368 | return false; |
@@ -528,7 +531,7 @@ discard block |
||
| 528 | 531 | /** |
| 529 | 532 | * mount an \OC\Files\Storage\Storage in our virtual filesystem |
| 530 | 533 | * |
| 531 | - * @param \OC\Files\Storage\Storage|string $class |
|
| 534 | + * @param string $class |
|
| 532 | 535 | * @param array $arguments |
| 533 | 536 | * @param string $mountpoint |
| 534 | 537 | */ |
@@ -660,6 +663,9 @@ discard block |
||
| 660 | 663 | return self::$defaultInstance->is_dir($path); |
| 661 | 664 | } |
| 662 | 665 | |
| 666 | + /** |
|
| 667 | + * @param string $path |
|
| 668 | + */ |
|
| 663 | 669 | static public function is_file($path) { |
| 664 | 670 | return self::$defaultInstance->is_file($path); |
| 665 | 671 | } |
@@ -672,6 +678,9 @@ discard block |
||
| 672 | 678 | return self::$defaultInstance->filetype($path); |
| 673 | 679 | } |
| 674 | 680 | |
| 681 | + /** |
|
| 682 | + * @param string $path |
|
| 683 | + */ |
|
| 675 | 684 | static public function filesize($path) { |
| 676 | 685 | return self::$defaultInstance->filesize($path); |
| 677 | 686 | } |
@@ -684,6 +693,9 @@ discard block |
||
| 684 | 693 | return self::$defaultInstance->isCreatable($path); |
| 685 | 694 | } |
| 686 | 695 | |
| 696 | + /** |
|
| 697 | + * @param string $path |
|
| 698 | + */ |
|
| 687 | 699 | static public function isReadable($path) { |
| 688 | 700 | return self::$defaultInstance->isReadable($path); |
| 689 | 701 | } |
@@ -696,6 +708,9 @@ discard block |
||
| 696 | 708 | return self::$defaultInstance->isDeletable($path); |
| 697 | 709 | } |
| 698 | 710 | |
| 711 | + /** |
|
| 712 | + * @param string $path |
|
| 713 | + */ |
|
| 699 | 714 | static public function isSharable($path) { |
| 700 | 715 | return self::$defaultInstance->isSharable($path); |
| 701 | 716 | } |
@@ -704,6 +719,9 @@ discard block |
||
| 704 | 719 | return self::$defaultInstance->file_exists($path); |
| 705 | 720 | } |
| 706 | 721 | |
| 722 | + /** |
|
| 723 | + * @param string $path |
|
| 724 | + */ |
|
| 707 | 725 | static public function filemtime($path) { |
| 708 | 726 | return self::$defaultInstance->filemtime($path); |
| 709 | 727 | } |
@@ -713,6 +731,7 @@ discard block |
||
| 713 | 731 | } |
| 714 | 732 | |
| 715 | 733 | /** |
| 734 | + * @param string $path |
|
| 716 | 735 | * @return string |
| 717 | 736 | */ |
| 718 | 737 | static public function file_get_contents($path) { |
@@ -735,6 +754,10 @@ discard block |
||
| 735 | 754 | return self::$defaultInstance->copy($path1, $path2); |
| 736 | 755 | } |
| 737 | 756 | |
| 757 | + /** |
|
| 758 | + * @param string $path |
|
| 759 | + * @param string $mode |
|
| 760 | + */ |
|
| 738 | 761 | static public function fopen($path, $mode) { |
| 739 | 762 | return self::$defaultInstance->fopen($path, $mode); |
| 740 | 763 | } |
@@ -750,6 +773,9 @@ discard block |
||
| 750 | 773 | return self::$defaultInstance->fromTmpFile($tmpFile, $path); |
| 751 | 774 | } |
| 752 | 775 | |
| 776 | + /** |
|
| 777 | + * @param string $path |
|
| 778 | + */ |
|
| 753 | 779 | static public function getMimeType($path) { |
| 754 | 780 | return self::$defaultInstance->getMimeType($path); |
| 755 | 781 | } |
@@ -762,6 +788,9 @@ discard block |
||
| 762 | 788 | return self::$defaultInstance->free_space($path); |
| 763 | 789 | } |
| 764 | 790 | |
| 791 | + /** |
|
| 792 | + * @param string $query |
|
| 793 | + */ |
|
| 765 | 794 | static public function search($query) { |
| 766 | 795 | return self::$defaultInstance->search($query); |
| 767 | 796 | } |
@@ -870,7 +899,7 @@ discard block |
||
| 870 | 899 | * @param string $path |
| 871 | 900 | * @param boolean $includeMountPoints whether to add mountpoint sizes, |
| 872 | 901 | * defaults to true |
| 873 | - * @return \OC\Files\FileInfo|bool False if file does not exist |
|
| 902 | + * @return \OCP\Files\FileInfo|null False if file does not exist |
|
| 874 | 903 | */ |
| 875 | 904 | public static function getFileInfo($path, $includeMountPoints = true) { |
| 876 | 905 | return self::$defaultInstance->getFileInfo($path, $includeMountPoints); |
@@ -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 | } |
@@ -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]); |