A few things concerning the File I/O Methods in the JS engine
Posted: Wed Feb 15, 2006 11:52 am
First: I'm toying around with the file i/o methods at the moment, but they seem a bit restrictive. According to the JS docs (and my own test), I can't search through a file for any strings longer than 2 characters, which makes it damn hard to do what I want (for instance, have a list of names or words in a txt file, and have the ability to search through that file to see if a certain word is present, if not, add it).
Secondly: Is there a way of finding out how many lines there are in a file?
And lastly: The JS Docs says:
Secondly: Is there a way of finding out how many lines there are in a file?
And lastly: The JS Docs says:
...while I actually had to use "write" and "read" to be able to do anything =) I assume "a" should also be "append" - but what is that one used for?accessMethod is a one byte string, which contains either "a" (append), "r" (read) or "w" (write).