| Syntax |
file.read (path, count)
|
| Params |
path is the path name to the file from which you wish to read data.
count is a number indicating the number of bytes to read.
|
| Action |
Reads count characters from the file at path.
|
| Returns |
A binary value containing the next count sequential bytes in the file at path, or False. (See Notes.)
|
| Examples |
file.open ("C:\\Program Files\\Frontier\\sample.txt")
file.read ("C:\\Program Files\\Frontier\\sample.txt", 22)
» "Contents of sample.txt" // first 22 bytes of sample.txt
file.open ("System:Test File");
file.read ("System:Test File", 20)
» true // Reads first 20 bytes in file. Remember to close the file!
|
| Notes |
If count is infinity, all of the remaining characters in the file are read. Otherwise, if there are fewer than count characters remaining in the file, the verb returns false.
As long as the file at path remains open, repeated calls to this verb read consecutive portions of the file.
This verb must be used only on a file that has been prevouisly opened.
|
| See Also |
file.write
file.readLine
file.endOfFile
file.open
file.close
|