apps/files_sharing/lib/Controller/ShareController.php 1 location
|
@@ 344-348 (lines=5) @@
|
| 341 |
|
* The OC_Util methods require a view. This just uses the node API |
| 342 |
|
*/ |
| 343 |
|
$freeSpace = $share->getNode()->getStorage()->free_space($share->getNode()->getInternalPath()); |
| 344 |
|
if ($freeSpace < \OCP\Files\FileInfo::SPACE_UNLIMITED) { |
| 345 |
|
$freeSpace = max($freeSpace, 0); |
| 346 |
|
} else { |
| 347 |
|
$freeSpace = (INF > 0) ? INF: PHP_INT_MAX; // work around https://bugs.php.net/bug.php?id=69188 |
| 348 |
|
} |
| 349 |
|
|
| 350 |
|
$hideFileList = !($share->getPermissions() & \OCP\Constants::PERMISSION_READ); |
| 351 |
|
$maxUploadFilesize = $freeSpace; |
lib/private/legacy/helper.php 1 location
|
@@ 426-431 (lines=6) @@
|
| 423 |
|
*/ |
| 424 |
|
public static function freeSpace($dir) { |
| 425 |
|
$freeSpace = \OC\Files\Filesystem::free_space($dir); |
| 426 |
|
if ($freeSpace < \OCP\Files\FileInfo::SPACE_UNLIMITED) { |
| 427 |
|
$freeSpace = max($freeSpace, 0); |
| 428 |
|
return $freeSpace; |
| 429 |
|
} else { |
| 430 |
|
return (INF > 0)? INF: PHP_INT_MAX; // work around https://bugs.php.net/bug.php?id=69188 |
| 431 |
|
} |
| 432 |
|
} |
| 433 |
|
|
| 434 |
|
/** |