Let other modules add/alter additional information about file passed in.

Parameters

string $file: The file path/name.

array $data: An associative array of metadata on the file.

array $cached: What data was found in the database (if any).

See also

Drupal\advagg\State\Files::scanFiles()

Related topics

1 function implements hook_advagg_scan_file_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

advagg_advagg_scan_file_alter in ./advagg.advagg.inc
Implements hook_advagg_scan_file_alter().
1 invocation of hook_advagg_scan_file_alter()
Files::scanFile in src/State/Files.php
Given a filename calculate various hashes and gather meta data.

File

./advagg.api.php, line 137

Code

function hook_advagg_scan_file_alter($file, array $data, array $cached) {
    $data['chars'] = strlen($data['content']);
}