You are here

function backup_file::read in Backup and Migrate 6.3

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

Read a line from the file.

1 call to backup_file::read()
backup_file::transfer in includes/files.inc
Transfer file using http to client. Similar to the built in file_transfer, but it calls module_invoke_all('exit') so that temp files can be deleted.

File

includes/files.inc, line 396
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 read($size = NULL) {
  if (!$this->handle) {
    $this->handle = $this
      ->open();
  }
  if ($this->handle && !feof($this->handle)) {
    return $size ? fread($this->handle, $size) : fgets($this->handle);
  }
  return NULL;
}