You are here

function example_file_set_status in Coder 7.2

Same name and namespace in other branches
  1. 7 coder_upgrade/tests/old/samples/example.module \example_file_set_status()

File

coder_upgrade/tests/old/samples/example.module, line 1818

Code

function example_file_set_status() {

  // file_set_status() -- Change the next line but leave this alone
  file_set_status($file, FILE_STATUS_PERMANENT);
  if (file_set_status($file, FILE_STATUS_PERMANENT)) {
  }

  // The following lines are the new code. Documentation example uses |= while patch has &=???
  $file->status &= FILE_STATUS_PERMANENT;
  $file = file_save($file);
}