Is there a tutorial for Gio?
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Florian Philipp
Sent: Monday, July 23, 2012 12:35 PM
To: [email protected]
Subject: Re: Simple I/O with Gio::???
Am 23.07.2012 17:57, schrieb Arbol One:
> I am looking for a tutorial on simple file I/O using Gio. All I want
> to do is to create/open a file, write to it and then delete it; all
> this in a local machine running Win7.
>
> I understand that the Gio library can do this simple things.
>
>
>
> TIA
>
>
How about this:
#include <giomm/file.h>
#include <giomm/fileoutputstream.h>
#include <glibmm/refptr.h>
void test()
{
using namespace Glib;
using namespace Gio;
RefPtr<File> file = File::create_for_path("test.txt");
RefPtr<FileOutputStream> stream = file->create_file();
stream->write("Hello world\n"); stream->close();
file->remove();
}
Take a look at the reference documentation. Start with Gio::File.
Regards,
Florian Philipp
_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list