%f = new fileObject();%f.openForRead("filename");while(!%f.isEOF()) //until %f has reached the end of the file{ echo(%f.readLine());}%f.close();%f.openForWrite("filename"); //Clear a file and being editing it%f.writeline("blah");%f.close();%f.openForAppend("filename"); //Open a file and add lines to the end of it%f.writeline("blah");%f.close();