Constructors
File()
Methods
close()
Closes the file. The File object is then ready to open a new file.eof()
Returns true if a read passed the end of file has been attempted.When you read lines in a loop, you can break out of the loop when this function return true.
flush()
Empties the output buffer, writing the data to the file.open(String,String)
Opens the file to be available for other calls.Use open(String,String,String) to provide a codepage.Modes:
open(String,String,String)
Opens the file with a codepage to be available for other calls.Use open(String,String) if you don’t need to specify codepage.Modes:
readAll()
Returns all text from the file.readBinary()
Reads the file and returns binary data in a Byte array.readLine()
Returns the next line from the file or a null string if no more data in the file.rewind()
Sets the current file pointer to the beginning of the file.unlink()
Deletes the file.write(String)
Writes data to the file.Can be called many times, adding more and more data to the file.