public function readfile(stored_file $file) {
        if ($this->is_file_readable_locally_by_storedfile($file, false)) {
            $path = $this->get_local_path_from_storedfile($file, false);
        } else {
            $path = $this->get_remote_path_from_storedfile($file);
        }
        readfile_allow_large($path, $file->get_filesize());
    }
public function readfile(stored_file $file) {
        if ($this->is_file_readable_locally_by_storedfile($file, false)) {
            $path = $this->get_local_path_from_storedfile($file, false);
        } else {
            $path = $this->get_remote_path_from_storedfile($file);
        }
        readfile_allow_large($path, $file->get_filesize());
    }
public function readfile ( stored_file $ file ) { if ( $ this -> is_file_readable_locally_by_storedfile ( $ file , false ) ) { $ path = $ this -> get_local_path_from_storedfile ( $ file , false ) ; } else { $ path = $ this -> get_remote_path_from_storedfile ( $ file ) ; } readfile_allow_large ( $ path , $ file -> get_filesize ( ) ) ; }
Output the content of the specified stored file.

Note, this is different to get_content() as it uses the built-in php
readfile function which is more efficient.

@param stored_file $file The file to serve.
@return void
Output the content of the specified stored file .