@@ -359,6 +359,10 @@ discard block |
||
359 | 359 | } |
360 | 360 | } |
361 | 361 | |
362 | + /** |
|
363 | + * @param string|boolean $user |
|
364 | + * @param string $root |
|
365 | + */ |
|
362 | 366 | public static function init($user, $root) { |
363 | 367 | if (self::$defaultInstance) { |
364 | 368 | return false; |
@@ -517,7 +521,7 @@ discard block |
||
517 | 521 | /** |
518 | 522 | * mount an \OC\Files\Storage\Storage in our virtual filesystem |
519 | 523 | * |
520 | - * @param \OC\Files\Storage\Storage|string $class |
|
524 | + * @param string $class |
|
521 | 525 | * @param array $arguments |
522 | 526 | * @param string $mountpoint |
523 | 527 | */ |
@@ -690,6 +694,9 @@ discard block |
||
690 | 694 | return self::$defaultInstance->is_dir($path); |
691 | 695 | } |
692 | 696 | |
697 | + /** |
|
698 | + * @param string $path |
|
699 | + */ |
|
693 | 700 | public static function is_file($path) { |
694 | 701 | return self::$defaultInstance->is_file($path); |
695 | 702 | } |
@@ -702,6 +709,9 @@ discard block |
||
702 | 709 | return self::$defaultInstance->filetype($path); |
703 | 710 | } |
704 | 711 | |
712 | + /** |
|
713 | + * @param string $path |
|
714 | + */ |
|
705 | 715 | public static function filesize($path) { |
706 | 716 | return self::$defaultInstance->filesize($path); |
707 | 717 | } |
@@ -714,6 +724,9 @@ discard block |
||
714 | 724 | return self::$defaultInstance->isCreatable($path); |
715 | 725 | } |
716 | 726 | |
727 | + /** |
|
728 | + * @param string $path |
|
729 | + */ |
|
717 | 730 | public static function isReadable($path) { |
718 | 731 | return self::$defaultInstance->isReadable($path); |
719 | 732 | } |
@@ -726,6 +739,9 @@ discard block |
||
726 | 739 | return self::$defaultInstance->isDeletable($path); |
727 | 740 | } |
728 | 741 | |
742 | + /** |
|
743 | + * @param string $path |
|
744 | + */ |
|
729 | 745 | public static function isSharable($path) { |
730 | 746 | return self::$defaultInstance->isSharable($path); |
731 | 747 | } |
@@ -743,6 +759,7 @@ discard block |
||
743 | 759 | } |
744 | 760 | |
745 | 761 | /** |
762 | + * @param string $path |
|
746 | 763 | * @return string |
747 | 764 | */ |
748 | 765 | public static function file_get_contents($path) { |
@@ -766,8 +783,8 @@ discard block |
||
766 | 783 | } |
767 | 784 | |
768 | 785 | /** |
769 | - * @param $path |
|
770 | - * @param $mode |
|
786 | + * @param string $path |
|
787 | + * @param string $mode |
|
771 | 788 | * @return resource |
772 | 789 | * @deprecated 11.0.0 |
773 | 790 | */ |
@@ -786,6 +803,9 @@ discard block |
||
786 | 803 | return self::$defaultInstance->fromTmpFile($tmpFile, $path); |
787 | 804 | } |
788 | 805 | |
806 | + /** |
|
807 | + * @param string $path |
|
808 | + */ |
|
789 | 809 | public static function getMimeType($path) { |
790 | 810 | return self::$defaultInstance->getMimeType($path); |
791 | 811 | } |
@@ -798,6 +818,9 @@ discard block |
||
798 | 818 | return self::$defaultInstance->free_space($path); |
799 | 819 | } |
800 | 820 | |
821 | + /** |
|
822 | + * @param string $query |
|
823 | + */ |
|
801 | 824 | public static function search($query) { |
802 | 825 | return self::$defaultInstance->search($query); |
803 | 826 | } |
@@ -907,7 +930,7 @@ discard block |
||
907 | 930 | * @param string $path |
908 | 931 | * @param boolean $includeMountPoints whether to add mountpoint sizes, |
909 | 932 | * defaults to true |
910 | - * @return \OC\Files\FileInfo|bool False if file does not exist |
|
933 | + * @return \OCP\Files\FileInfo|null False if file does not exist |
|
911 | 934 | */ |
912 | 935 | public static function getFileInfo($path, $includeMountPoints = true) { |
913 | 936 | return self::$defaultInstance->getFileInfo($path, $includeMountPoints); |
@@ -315,6 +315,9 @@ |
||
315 | 315 | } |
316 | 316 | } |
317 | 317 | |
318 | + /** |
|
319 | + * @param string $revision |
|
320 | + */ |
|
318 | 321 | public static function restoreVersion($uid, $filename, $fileToRestore, $revision) { |
319 | 322 | if (\OC::$server->getConfig()->getSystemValue('files_versions', Storage::DEFAULTENABLED) !== true) { |
320 | 323 | return false; |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | /** |
395 | 395 | * store remote ID in federated reShare table |
396 | 396 | * |
397 | - * @param $shareId |
|
397 | + * @param integer $shareId |
|
398 | 398 | * @param $remoteId |
399 | 399 | */ |
400 | 400 | public function storeRemoteId($shareId, $remoteId) { |
@@ -801,7 +801,7 @@ discard block |
||
801 | 801 | /** |
802 | 802 | * get database row of a give share |
803 | 803 | * |
804 | - * @param $id |
|
804 | + * @param integer $id |
|
805 | 805 | * @return array |
806 | 806 | * @throws ShareNotFound |
807 | 807 | */ |
@@ -1001,12 +1001,12 @@ discard block |
||
1001 | 1001 | } |
1002 | 1002 | |
1003 | 1003 | /** |
1004 | - * @param $remote |
|
1005 | - * @param $token |
|
1006 | - * @param $name |
|
1007 | - * @param $owner |
|
1008 | - * @param $shareWith |
|
1009 | - * @param $remoteId |
|
1004 | + * @param string $remote |
|
1005 | + * @param string $token |
|
1006 | + * @param string $name |
|
1007 | + * @param string $owner |
|
1008 | + * @param string $shareWith |
|
1009 | + * @param integer $remoteId |
|
1010 | 1010 | * |
1011 | 1011 | * @return int |
1012 | 1012 | */ |
@@ -24,7 +24,6 @@ |
||
24 | 24 | namespace OC\Files\Storage; |
25 | 25 | |
26 | 26 | use OC\Files\Cache\FailedCache; |
27 | -use OCP\Files\Storage\IStorage; |
|
28 | 27 | use \OCP\Lock\ILockingProvider; |
29 | 28 | use \OCP\Files\StorageNotAvailableException; |
30 | 29 | use Psr\Http\Message\StreamInterface; |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | * |
361 | 361 | * @param string $path |
362 | 362 | * @param string $mode |
363 | - * @return resource|bool |
|
363 | + * @return resource |
|
364 | 364 | * @throws GenericEncryptionException |
365 | 365 | * @throws ModuleDoesNotExistsException |
366 | 366 | */ |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | * Set the flag to true, so that the file would be |
645 | 645 | * in the decrypted state. |
646 | 646 | * |
647 | - * @param $isDisabled bool |
|
647 | + * @param boolean $isDisabled bool |
|
648 | 648 | */ |
649 | 649 | public static function setDisableWriteEncryption($isDisabled) { |
650 | 650 | self::$disableWriteEncryption = $isDisabled; |
@@ -902,7 +902,7 @@ discard block |
||
902 | 902 | /** |
903 | 903 | * return header size of given file |
904 | 904 | * |
905 | - * @param string|resource $path |
|
905 | + * @param string $path |
|
906 | 906 | * @return int |
907 | 907 | */ |
908 | 908 | protected function getHeaderSize($path) { |
@@ -953,7 +953,7 @@ discard block |
||
953 | 953 | /** |
954 | 954 | * read header from file |
955 | 955 | * |
956 | - * @param string|resource $path |
|
956 | + * @param string $path |
|
957 | 957 | * @return array |
958 | 958 | */ |
959 | 959 | protected function getHeader($path) { |
@@ -1049,7 +1049,7 @@ discard block |
||
1049 | 1049 | /** |
1050 | 1050 | * check if path points to a files version |
1051 | 1051 | * |
1052 | - * @param $path |
|
1052 | + * @param string $path |
|
1053 | 1053 | * @return bool |
1054 | 1054 | */ |
1055 | 1055 | protected function isVersion($path) { |
@@ -39,7 +39,6 @@ |
||
39 | 39 | use function GuzzleHttp\Psr7\stream_for; |
40 | 40 | use OCP\Files\ForbiddenException; |
41 | 41 | use OCP\Files\IOException; |
42 | -use OCP\Files\Storage\IStorage; |
|
43 | 42 | use Psr\Http\Message\StreamInterface; |
44 | 43 | |
45 | 44 | /** |