The methods defined in the File class are summarized in the following table.
| Method | Description |
|---|---|
| close | Closes an open file |
| commit | Commits any outstanding updates that have been cached in memory to the file |
| currentOffset | Returns the current offset as an |
| currentOffset64 | Returns the current offset as an |
| currentOffsetDec | Returns the current offset as a |
| endOfFile | Returns true if the end of the file has been reached |
| errorCode | Returns the last operating system error code as an integer value |
| extractSort | Sorts the contents of the file into the specified sort order |
| fileLength | Returns the size of the file as an |
| fileLength64 | Returns the size of the file as an |
| fileLengthDec | Returns the size of the file as a |
| isAvailable | Returns true if the specified file is available |
| isOpen | Returns true if the specified file is currently open |
| lastAccessed | Returns the |
| lastModified | Returns the |
| open | Opens the file |
| openInput | Opens the file for input |
| openOutput | Opens the file for output |
| peek | Returns the file record at the specified position |
| purge | Deletes the file and its contents from disk |
| readBinary | Returns the specified number of bytes from the current file offset |
| readLine | Returns the next line in the file |
| readString | Returns the specified number of characters from the file |
| rename | Changes the name of the file |
| seek | Repositions the file pointer at a specified |
| seek64 | Repositions the file pointer at a specified |
| seekDec | Repositions the file pointer at a specified |
| timeCreated | Returns the |
| tryOpen | Opens the file and returns true if successful |
| writeBinary | Writes the specified number of bytes to the file |
| writeLine | Writes the specified line to the file |
| writeString | Writes the specified string to the file |