public File::setSize($size)
Sets the size of the file.
Parameters
int $size: The size of the file in bytes.
Overrides FileInterface::setSize
File
- core/modules/file/src/Entity/File.php, line 101
 
Class
- File
 - Defines the file entity class.
 
Namespace
Drupal\file\Entity
Code
public function setSize($size) {
  $this->get('filesize')->value = $size;
}
Please login to continue.