file.update:before $file, $values, $strings /site/config/config.php return [ 'hooks' => [ 'file.update:before' => function ($file, $values, $strings) { // your code goes here } ] ]