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