You are here

function backup_file::backup_file in Backup and Migrate 6.3

Same name and namespace in other branches
  1. 8.2 includes/files.inc \backup_file::backup_file()
  2. 8.3 includes/files.inc \backup_file::backup_file()
  3. 6.2 includes/files.inc \backup_file::backup_file()
  4. 7.2 includes/files.inc \backup_file::backup_file()

Construct a file object given a file path, or create a temp file for writing.

File

includes/files.inc, line 216
General file handling code for Backup and Migrate.

Class

backup_file
A backup file which allows for saving to and reading from the server.

Code

function backup_file($params = array()) {
  if (isset($params['filepath']) && file_exists($params['filepath'])) {
    $this
      ->set_filepath($params['filepath']);
  }
  else {
    $this
      ->set_file_info($params);
    $this
      ->temporary_file();
  }
}