testfile = new File("/home/T11D/tapulika/LW/test1.html");
x = testfile.open("r | w | r+ ");
if (!x )
write("Error in opening file ");
else
write("No Problem");
y = testfile.getPosition();
write("
The default position is "+ y+ "");
a= testfile.setPosition(2);
write("The number of bytes before is "+ testfile.getLength()+ "" );
testfile.write("This is a test")
write("The number of bytes after is "+ testfile.getLength()+ "" );
if (testfile.error() != 0)
write("error in file operations ");
write ("
The first 80 bytes are "+testfile.read(80) + "");
write("
The next line is "+testfile.readln()+"");
a= testfile.setPosition(0);
if (!a)
write ("Not successful in setting to the first");
testfile.close()