// Build using: valac --pkg gio-2.0 test-copy-progress.vala

int main () {
    var uri = "http://zeenix.fedorapeople.org/drivers/win-tools/preinst/winxp/amd64/viostor.cat";
    var remote = File.new_for_uri (uri);
    var local = File.new_for_path ("/tmp/viostor.cat");

    FileProgressCallback copy_progress_callback = (current_num_bytes, total_num_bytes) => {
        print ("current: %lld, total: %lld\n", current_num_bytes, total_num_bytes);
    };

    remote.copy (local, FileCopyFlags.OVERWRITE | FileCopyFlags.ALL_METADATA, null, copy_progress_callback);

    return 0;
}
