On 6/27/06, Christian Biesinger <[EMAIL PROTECTED]> wrote:

prodizy wrote:
> How do I read a file, line by line, without using the unfrozen
> interface nsILineInputStream?
> Especially, when I am using nsILocalFile::openNSPRFileDesc() with
> PR_Read(). Ofcourse, I can read byte by byte till I get newline char.
> But is there any simple way to do this?

Hm... you may have to use openANSIFileDesc for that, or do line reading
manually. You don't have to read byte by byte, you can read larger
chunks into a buffer and look for a newline there.


Oh! OK. But what all functions can I use when I use openANSIFileDesc()? More
broadly, what all features of C++ can I use in XPCOM? Is there any reference
available somewhere? In the portability guide, it's mentioned that **don't
use C++ standard library features including iostream(I haven't read the
guide fully).

And when I use nsIFile::directoryEntries, is there any direct way of getting
number of entries in the directory other than iterating and counting the
entries? Is it not possible to add a function to the nsISimpleEnumerator to
get the number of entries it is pointing to?


Thanks a lot for the help,

- Rajendra Prasad Murakonda,
http://prodizy.livejournal.com
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to