You are here

public function FileStorageInterface::spaceUsed in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/file/src/FileStorageInterface.php \Drupal\file\FileStorageInterface::spaceUsed()
  2. 10 core/modules/file/src/FileStorageInterface.php \Drupal\file\FileStorageInterface::spaceUsed()

Determines total disk space used by a single user or the whole filesystem.

Parameters

int $uid: Optional. A user id, specifying NULL returns the total space used by all non-temporary files.

int $status: (Optional) The file status to consider. The default is to only consider files in status FileInterface::STATUS_PERMANENT.

Return value

int An integer containing the number of bytes used.

1 method overrides FileStorageInterface::spaceUsed()
FileStorage::spaceUsed in core/modules/file/src/FileStorage.php
Determines total disk space used by a single user or the whole filesystem.

File

core/modules/file/src/FileStorageInterface.php, line 25

Class

FileStorageInterface
Defines an interface for file entity storage classes.

Namespace

Drupal\file

Code

public function spaceUsed($uid = NULL, $status = FileInterface::STATUS_PERMANENT);