public function backup_file::__construct in Backup and Migrate 7.3
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
public function __construct($params = array()) {
if (isset($params['filepath']) && file_exists($params['filepath'])) {
$this
->set_filepath($params['filepath']);
}
else {
$this
->set_file_info($params);
$this
->temporary_file();
}
}