writing and reading from files

Etan Reisner pidgin at unreliablesource.net
Wed Jan 21 07:59:41 EST 2009


On Wed, Jan 21, 2009 at 02:35:45AM -0800, arun kumar wrote:
> hi all,
> what function to use in order to read and  write to a file  from
> within a callback function (specially  receiving_im_msg_cb() ) in a
> plugin?

That depends almost entirel on whether your plugin is written in C, perl,
or tcl, what sort of data you need to be writing/reading, and whether the
writing needs to be purely updates (like a log file) or can include
re-writes of existing data (like a preferences file).

I would also strongly suggest that reading and writing files on ever
received message is likely to be much more work than is a good idea and
that you should perhaps look into whether you can defer reading/writing
until later points.

    -Etan




More information about the Devel mailing list