Act on a newly created file.
This hook runs after a new file object has just been instantiated. It can be used to set initial values, e.g. to provide defaults.
\Drupal\file\Plugin\Core\Entity\File $file: The file object.
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
function hook_file_create(\Drupal\file\Plugin\Core\Entity\File $file) {
if (!isset($file->foo)) {
$file->foo = 'some_initial_value';
}
}