File < Handle

Last Updated2024-04-13
Created At2014-11-19

A File object can be obtained by calling OpenFile(). File objects should be closed with delete or Close(). Note that, "delete file" does not actually delete the file, it just closes the handle.

Methods19
SymbolDescription
CloseClose the file handle. This is the same as using CloseHandle() or delete.
EndOfFileTests if the end of file has been reached.
FlushFlushes a file's buffered output; any buffered output is immediately written to the file.
ReadReads binary data from a file.
ReadInt16Reads a single int16 (short) from a file. The value is sign-extended to an int32.
ReadInt32Reads a single int32 (int/cell) from a file.
ReadInt8Reads a single int8 (byte) from a file. The returned value is sign- extended to an int32.
ReadLineReads a line of text from a file.
ReadStringReads a UTF8 or ANSI string from a file.
ReadUint16Reads a single unt16 (unsigned short) from a file. The value is zero- extended to an int32.
ReadUint8Reads a single uint8 (unsigned byte) from a file. The returned value is zero-extended to an int32.
SeekSets the file position indicator.
SizeGet the file size in bytes.
WriteWrites binary data to a file.
WriteInt16Writes a single int16 (short) to a file.
WriteInt32Writes a single int32 (int/cell) to a file.
WriteInt8Writes a single int8 (byte) to a file.
WriteLineWrites a line of text to a text file. A newline is automatically appended.
WriteStringWrites a binary string to a file.
Properties1
SymbolTypeDescription
PositionintGet the current position in the file; returns -1 on failure.