IOChannel objects



Hello,

I think that for best Glib::ustring preservation, must save them to
disk using Glib::IOChannel objects. If so, have you got a more
comprehensible examples of the usage of these objects ?

For example,

To open file in read mode...

Glib::RefPtr<Glib::IOChannel> ifile =
Glib::IOChannel::create_from_file (string & filename, "r");

 Is it OK ?


1) I need to write a file and read from it (both sequentially),

Is it possible to do:   ifile.read_line(Glib::ustring& line); ?


2) How could detect the EOF mark ?

Furthermore, I thought formatting files using CSV format (so, using
characters ':' as delimiters).

What do you suggest ?

Could help ?

S.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]