You are here

function Resource::set_status in D7 Media 6

Mark a file as permanent.

Return value

bool

File

resource/resource.module, line 302
Resource API for Drupal, a replacement for files.

Class

Resource
Base Resource class.

Code

function set_status($bitmask = NULL) {
  if (is_null($bitmask)) {
    return $file->status;
  }
  elseif (db_query('UPDATE {files} SET status=%d', $bitmask, $this->fid)) {
    $this->status = $status;
    module_invoke_all('file_set_status', $this, $status);
    return TRUE;
  }
  return FALSE;
}