public static function get_backup_file_info($filename, $filearea, $contextid) {
        $fs = get_file_storage();
        $file = $fs->get_file($contextid, 'backup', $filearea, 0, '/', $filename);
        $filesize = display_size ($file->get_filesize());
        $fileurl = moodle_url::make_pluginfile_url(
            $file->get_contextid(),
            $file->get_component(),
            $file->get_filearea(),
            null,
            $file->get_filepath(),
            $file->get_filename(),
            true
            );

        $params = array();
        $params['action'] = 'choosebackupfile';
        $params['filename'] = $file->get_filename();
        $params['filepath'] = $file->get_filepath();
        $params['component'] = $file->get_component();
        $params['filearea'] = $file->get_filearea();
        $params['filecontextid'] = $file->get_contextid();
        $params['contextid'] = $contextid;
        $params['itemid'] = $file->get_itemid();
        $restoreurl = new moodle_url('/backup/restorefile.php', $params);
        $filesize = display_size ($file->get_filesize());

        $results = array(
            'filesize' => $filesize,
            'fileurl' => $fileurl->out(false),
            'restoreurl' => $restoreurl->out(false));

        return $results;
    }