function _file_mass_update_helper in File admin 7
File Mass Update - helper function.
2 calls to _file_mass_update_helper()
- file_admin_mass_update in ./file_admin.module 
- Make mass update of files, changing all files in the $files array to update them with the field values in $updates.
- _file_mass_update_batch_process in ./file_admin.module 
- File Mass Update Batch operation
File
- ./file_admin.module, line 490 
- Enhances file administration by adding published, promote, and sticky fields.
Code
function _file_mass_update_helper($fid, $updates) {
  $file = file_load($fid, NULL, TRUE);
  // For efficiency manually save the original file before applying any changes.
  $file->original = clone $file;
  foreach ($updates as $name => $value) {
    $file->{$name} = $value;
  }
  file_save($file);
  return $file;
}