Act on a file being inserted or updated.
This hook is called when a file has been added to the database. The hook doesn't distinguish between files created as a result of a copy or those created by an upload.
$file: The file that has just been created.
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_presave($file) {
// Change the file timestamp to an hour prior.
$file->timestamp -= 3600;
}