• File API example?

    From art@FATCATS to All on Tuesday, February 08, 2011 07:06:08
    Hey guys, can anyone provide some help on using the file IO API?

    Specifically, reading lines from a text file, and writing lines to a file? A quick example would be quite handy. I've followed the documentation in the API which doesn't seem to have too much to initialize but haven't been able to do much with it.

    Thanks,
    ________________ _______
    \_____ __ \ ___\
    \ __ \ <_ \ @ fatcats[dot]poorcoding[dot]com
    \_______\___\___\___\ ------------------------------------
    f a t c a t s b b s

    ---
    ■ Synchronet ■ fatcats bbs - http://fatcats.poorcoding.com
  • From Digital Man to art on Tuesday, February 08, 2011 14:29:52
    Re: File API example?
    By: art to All on Tue Feb 08 2011 07:06 am

    Hey guys, can anyone provide some help on using the file IO API?

    Specifically, reading lines from a text file, and writing lines to a file?
    A quick example would be quite handy. I've followed the documentation in
    the API which doesn't seem to have too much to initialize but haven't been able to do much with it.

    Use file.readln() to read a line, file.writeln() to write a line. There are lots of example uses of the File class in exec/*.js.

    Perhaps if you gave us an example of what you have tried, we can assist.

    digital man

    Snapple "Real Fact" #72:
    The average person uses 150 gallons of water per day for personal use.