@@ -8,7 +8,6 @@ |
||
| 8 | 8 | |
| 9 | 9 | namespace OC\Files\Node; |
| 10 | 10 | |
| 11 | -use OC\Files\Cache\Cache; |
|
| 12 | 11 | use OC\Files\Mount\Manager; |
| 13 | 12 | use OC\Files\Mount\Mount; |
| 14 | 13 | use OCP\Files\NotFoundException; |
@@ -347,6 +347,10 @@ discard block |
||
| 347 | 347 | return $this->basicOperation('file_get_contents', $path, array('read')); |
| 348 | 348 | } |
| 349 | 349 | |
| 350 | + /** |
|
| 351 | + * @param string|null $path |
|
| 352 | + * @param boolean $run |
|
| 353 | + */ |
|
| 350 | 354 | protected function emit_file_hooks_pre($exists, $path, &$run) { |
| 351 | 355 | if (!$exists) { |
| 352 | 356 | \OC_Hook::emit(Filesystem::CLASSNAME, Filesystem::signal_create, array( |
@@ -365,6 +369,9 @@ discard block |
||
| 365 | 369 | )); |
| 366 | 370 | } |
| 367 | 371 | |
| 372 | + /** |
|
| 373 | + * @param string|null $path |
|
| 374 | + */ |
|
| 368 | 375 | protected function emit_file_hooks_post($exists, $path) { |
| 369 | 376 | if (!$exists) { |
| 370 | 377 | \OC_Hook::emit(Filesystem::CLASSNAME, Filesystem::signal_post_create, array( |
@@ -546,6 +553,9 @@ discard block |
||
| 546 | 553 | } |
| 547 | 554 | } |
| 548 | 555 | |
| 556 | + /** |
|
| 557 | + * @return string |
|
| 558 | + */ |
|
| 549 | 559 | public function copy($path1, $path2) { |
| 550 | 560 | $postFix1 = (substr($path1, -1, 1) === '/') ? '/' : ''; |
| 551 | 561 | $postFix2 = (substr($path2, -1, 1) === '/') ? '/' : ''; |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * @param string $route |
| 35 | 35 | * @param array $parameters |
| 36 | 36 | * @return |
| 37 | - * @internal param array $args with param=>value, will be appended to the returned url |
|
| 37 | + string @internal param array $args with param=>value, will be appended to the returned url |
|
| 38 | 38 | * @return string the url |
| 39 | 39 | * |
| 40 | 40 | * Returns a url to the given app and file. |
@@ -273,6 +273,9 @@ discard block |
||
| 273 | 273 | return self::linkToRoute( 'core_ajax_preview', array('x' => 36, 'y' => 36, 'file' => $path )); |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | + /** |
|
| 277 | + * @param string $path |
|
| 278 | + */ |
|
| 276 | 279 | public static function publicPreviewIcon( $path, $token ) { |
| 277 | 280 | return self::linkToRoute( 'core_ajax_public_preview', array('x' => 36, 'y' => 36, 'file' => $path, 't' => $token)); |
| 278 | 281 | } |
@@ -341,7 +344,7 @@ discard block |
||
| 341 | 344 | /** |
| 342 | 345 | * Make a computer file size |
| 343 | 346 | * @param string $str file size in human readable format |
| 344 | - * @return int a file size in bytes |
|
| 347 | + * @return double a file size in bytes |
|
| 345 | 348 | * |
| 346 | 349 | * Makes 2kB to 2048. |
| 347 | 350 | * |
@@ -856,7 +859,7 @@ discard block |
||
| 856 | 859 | * |
| 857 | 860 | * @param string $path |
| 858 | 861 | * @param \OCP\Files\FileInfo $rootInfo (optional) |
| 859 | - * @return array |
|
| 862 | + * @return string |
|
| 860 | 863 | */ |
| 861 | 864 | public static function getStorageInfo($path, $rootInfo = null) { |
| 862 | 865 | // return storage info without adding mount points |
@@ -939,7 +942,7 @@ discard block |
||
| 939 | 942 | |
| 940 | 943 | /** |
| 941 | 944 | * Returns whether the config file is set manually to read-only |
| 942 | - * @return bool |
|
| 945 | + * @return string |
|
| 943 | 946 | */ |
| 944 | 947 | public static function isReadOnlyConfigEnabled() { |
| 945 | 948 | return \OC::$server->getConfig()->getSystemValue('config_is_read_only', false); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | * Constructor. |
| 52 | 52 | * @param resource|string $imageRef The path to a local file, a base64 encoded string or a resource created by |
| 53 | 53 | * an imagecreate* function. |
| 54 | - * @return \OC_Image False on error |
|
| 54 | + * @return false|null False on error |
|
| 55 | 55 | */ |
| 56 | 56 | public function __construct($imageRef = null) { |
| 57 | 57 | //OC_Log::write('core',__METHOD__.'(): start', OC_Log::DEBUG); |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | /** |
| 269 | - * @return resource Returns the image resource in any. |
|
| 269 | + * @return boolean Returns the image resource in any. |
|
| 270 | 270 | */ |
| 271 | 271 | public function resource() { |
| 272 | 272 | return $this->resource; |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | * Loads an image from an open file handle. |
| 425 | 425 | * It is the responsibility of the caller to position the pointer at the correct place and to close the handle again. |
| 426 | 426 | * @param resource $handle |
| 427 | - * @return resource|false An image resource or false on error |
|
| 427 | + * @return boolean|null An image resource or false on error |
|
| 428 | 428 | */ |
| 429 | 429 | public function loadFromFileHandle($handle) { |
| 430 | 430 | OC_Log::write('core', __METHOD__.'(): Trying', OC_Log::DEBUG); |
@@ -944,6 +944,7 @@ discard block |
||
| 944 | 944 | * @param string $fileName [optional] <p>The path to save the file to.</p> |
| 945 | 945 | * @param int $bit [optional] <p>Bit depth, (default is 24).</p> |
| 946 | 946 | * @param int $compression [optional] |
| 947 | + * @param boolean $im |
|
| 947 | 948 | * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. |
| 948 | 949 | */ |
| 949 | 950 | function imagebmp($im, $fileName='', $bit=24, $compression=0) { |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | /** |
| 496 | 496 | * find the l10n directory |
| 497 | 497 | * @param string $app App that needs to be translated |
| 498 | - * @return directory |
|
| 498 | + * @return string |
|
| 499 | 499 | */ |
| 500 | 500 | protected static function findI18nDir($app) { |
| 501 | 501 | // find the i18n dir |
@@ -515,7 +515,7 @@ discard block |
||
| 515 | 515 | /** |
| 516 | 516 | * find all available languages for an app |
| 517 | 517 | * @param string $app App that needs to be translated |
| 518 | - * @return array an array of available languages |
|
| 518 | + * @return string[] an array of available languages |
|
| 519 | 519 | */ |
| 520 | 520 | public static function findAvailableLanguages($app=null) { |
| 521 | 521 | $available=array('en');//english is always available |
@@ -21,7 +21,6 @@ |
||
| 21 | 21 | /** |
| 22 | 22 | * get an L10N instance |
| 23 | 23 | * @param string $app |
| 24 | - * @param string|null $lang |
|
| 25 | 24 | * @return \OC_L10N |
| 26 | 25 | */ |
| 27 | 26 | public function get($app) { |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * sets up the |
| 37 | - * @param ZipArchive $zip ZipArchive object |
|
| 37 | + * @param boolean $zip ZipArchive object |
|
| 38 | 38 | * @param object $db a database object (required for exporttype user) |
| 39 | 39 | * @return bool|null |
| 40 | 40 | */ |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * returns the appid of the provider |
| 47 | - * @return string |
|
| 47 | + * @return boolean |
|
| 48 | 48 | */ |
| 49 | 49 | public function getID() { |
| 50 | 50 | return $this->id; |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | * @param int $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image |
| 76 | 76 | * @param bool $scalingUp Disable/Enable upscaling of previews |
| 77 | 77 | * @throws \Exception |
| 78 | - * @return mixed (bool / string) |
|
| 78 | + * @return integer (bool / string) |
|
| 79 | 79 | * false if thumbnail does not exist |
| 80 | 80 | * path to thumbnail if thumbnail exists |
| 81 | 81 | */ |
@@ -882,6 +882,9 @@ discard block |
||
| 882 | 882 | } |
| 883 | 883 | |
| 884 | 884 | |
| 885 | + /** |
|
| 886 | + * @param integer $fileId |
|
| 887 | + */ |
|
| 885 | 888 | private function getPreviewPath($fileId) { |
| 886 | 889 | return $this->getThumbnailsFolder() . '/' . $fileId . '/'; |
| 887 | 890 | } |