main
FileReader fr = null
try
fr = new FileReader "image.png"
catch IOException e
print "Opening of the file failed."
Class used to read files from filesystem.
Opens a file for reading. The current file position is at the beginning of the file.
main
FileReader fr = null
try
fr = new FileReader "image.png"
catch IOException e
print "Opening of the file failed."
Moves the current file position to the newPos.
main
FileReader fr = new FileReader "image.png"
try
fr.set position to 1000
catch IOException e
print "Tried to set invalid position."
Get the current file position.
main
FileReader fr = new FileReader "image.png"
int filePosition = fr.get position
print "File is at position: " & filePosition
Get the size of the file.
main
FileReader fr = new FileReader "image.png"
int fileSize = fr.get size
print "Size of the file is: " & fileSize