public function backup_file::set_file_info in Backup and Migrate 7.3
Same name and namespace in other branches
- 8.2 includes/files.inc \backup_file::set_file_info()
- 8.3 includes/files.inc \backup_file::set_file_info()
- 6.3 includes/files.inc \backup_file::set_file_info()
- 6.2 includes/files.inc \backup_file::set_file_info()
- 7.2 includes/files.inc \backup_file::set_file_info()
Set the file info.
2 calls to backup_file::set_file_info()
- backup_file::set_filepath in includes/
files.inc - Set the current filepath.
- backup_file::__construct in includes/
files.inc - Construct a file object given a file path, or create a temp file for writing.
File
- includes/
files.inc, line 530 - 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 set_file_info($file_info) {
$this->file_info = $file_info;
$this->ext = explode('.', @$this->file_info['filename']);
// Remove the underscores added to file extensions by Drupal's upload security.
foreach ($this->ext as $key => $val) {
$this->ext[$key] = trim($val, '_');
}
$this
->filename(array_shift($this->ext));
$this
->detect_filetype_from_extension();
}