The following are the File object functions for COD scripts.

FunctionExampleDescription
close<file>.close()True/False
delete<file>.delete(<boolean>)
<file>.delete()
<file>.delete(True)
True/False
fileobject myfile = new file("<file>",<mode>)
object myfile as file("<file>",<mode>)
<object>
open<file>.open("<file>",<mode>)
<file>.open("c:/myfile.txt",forinput)
True/False
readbyte<file>.readbyte()<numeric>
readchar<file>.readchar()<string>
readint<file>.readint()<numeric>
readline<file>.readline()<string>
readreal<file>.readreal()<numeric>
readstring<file>.readstring()<string>
readword<file>.readword()<numeric>
rename<file>.rename("<string>")
<file>.rename("C:\MyRenamedFile.txt")
True/False
writebyte<file>.writebyte(<number>)True/False
writechar<file>.writechar("<string>")True/False
writeint<file>.writeint(<number>)True/False
writeline<file>.writeline("<string>",<boolean>)
<file>.writeline("ABCdef")
<file>.writeline("ABCdef", True)
<integer>
writereal<file>.writereal(<number>)True/False
writestring<file>.writestring("<string>")True/False
writeword<file>.writeword(<number>)True/False