You are here

function backup_file::set_filepath in Backup and Migrate 7.2

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

Set the current filepath.

1 call to backup_file::set_filepath()
backup_file::backup_file in includes/files.inc
Construct a file object given a file path, or create a temp file for writing.

File

includes/files.inc, line 170
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 set_filepath($path) {
  $this->path = $path;
  $params = array(
    'filename' => basename($path),
  );
  if (file_exists($path)) {
    $params['filesize'] = filesize($path);
    $params['filetime'] = filemtime($path);
  }
  $this
    ->set_file_info($params);
}