Hi, Which of the following is the best way to read and write files in an XPCOM component(using C++)?
1. NSPR? - In PR_open(), instead of a char*, can I specify nsILocalFile as the file to be opened ? 2. nsIFileInputStream & nsIFileOutputStream? - I want to avoid this as these interfaces are not frozen. 3. normal fread/fwrite? 4. nsIIoservice? Or Is there any other easier way? Am I missing something? And most importantly, does mode paramenter we need to pass when opening a file with nsILocalFile::OpenAnsiFileDesc() is supported by Windows? What should be the argument in case of Windows? I looked at prio.h, it just says that windows doesn't supports mode flags. I tried writing to a file using OpenAnsiFileDesc() & fwrite(). But the file I open is becoming read only. And nothing is written to the file. Are there any C++ examples available for doing file I/O in XPCOM? Any help is very much appreciated. - Rajendra Prasad Murakonda http://prodizy.livejournal.com/ _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
