Hello,
> I'm developing an application using PalmOS and I need to transfer data to
>a PC.
> In this application, before starting the transfer, I need to read, modify
>and write some files. Does anybody knows where I could find more
>information about operations with files using FileStream.h? An example of
>a code would be very useful.
I had a great deal of difficulty with the Palm file streaming API. There
are
some errors in the Palm documentation. Here are a couple of suggestions
that should make your struggle a little less painful than mine was:
1. Always check the Err pointer. Don't depend on the function's
return value. For example,
fStream = FileOpen ( 0, "myfile.txt", 0, 0, fileModeReadOnly, &fErr );
Don't depend on fStream to tell you whether or not the function
succeeded. Look at the value of fErr. fStream may be non-NULL
even though no file was opened.
2. Unlike ftell(), FileTell() can be used both to get the location of
the file read/write pointer AND the size of the file. FileTell() is
a little bit like a combination of ftell() and stat().
Good luck!
Greg Bungo
[EMAIL PROTECTED]
(630)949-3250 voice
(630)949-3299 fax