summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-02-28 13:49:27 +0100
committerGitHub <noreply@github.com>2019-02-28 13:49:27 +0100
commit7519a9a9903565f53d6b656fbd328a83df6011b9 (patch)
treef47193d9c8b4081618af605f817a0f70652f21ea /lib/public
parentc30ceddcce76ca441481f5e7eed4601df19c505d (diff)
parent8fc47c6f002dd47518cea34ec5fe113fa5b915b7 (diff)
downloadnextcloud-server-7519a9a9903565f53d6b656fbd328a83df6011b9.tar.gz
nextcloud-server-7519a9a9903565f53d6b656fbd328a83df6011b9.zip
Merge pull request #14412 from nextcloud/fileinfo-raw-size
add option to get raw size (without submounts) from fileinfo
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Files/FileInfo.php3
-rw-r--r--lib/public/Files/Node.php3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/public/Files/FileInfo.php b/lib/public/Files/FileInfo.php
index e25a47e83cd..c256f0980f0 100644
--- a/lib/public/Files/FileInfo.php
+++ b/lib/public/Files/FileInfo.php
@@ -81,10 +81,11 @@ interface FileInfo {
/**
* Get the size in bytes for the file or folder
*
+ * @param bool $includeMounts whether or not to include the size of any sub mounts, since 16.0.0
* @return int
* @since 7.0.0
*/
- public function getSize();
+ public function getSize($includeMounts = true);
/**
* Get the last modified date as timestamp for the file or folder
diff --git a/lib/public/Files/Node.php b/lib/public/Files/Node.php
index 59bd0e193c6..016b217afc3 100644
--- a/lib/public/Files/Node.php
+++ b/lib/public/Files/Node.php
@@ -136,12 +136,13 @@ interface Node extends FileInfo {
/**
* Get the size of the file or folder in bytes
*
+ * @param bool $includeMounts
* @return int
* @throws InvalidPathException
* @throws NotFoundException
* @since 6.0.0
*/
- public function getSize();
+ public function getSize($includeMounts = true);
/**
* Get the Etag of the file or folder