Simon Fraser wrote: > I need to read in a file in JS, perferably a line at a time, using an > nsIFile. How to do this? > > I can make an nsIFileInputStream and init it with an nsIFile, but > nsIInputStream.read is not scriptable! You need to use nsIScriptableInputStream, implemented by an nsScriptableInputStream adapter class you create using the "@mozilla.org/scriptableinputstream;1" contract-id. Alas, I don't see any read-one-line method. Are you adapting nsIFileSpec code? /be
- How to read the contents of an nsIFile in JavaScript Simon Fraser
