ArcBasicDocs

ReadFile

Opens a file for reading.

ReadFile ( filename$ )

Parameters

filename$
the file to open.

Description

Opens a file for reading and gives back its handle, or 0 if the file doesn't exist or can't be read. Always check for 0 before reading. Read it with commands such as ReadLine and ReadInt, and close it with CloseFile when done.

In ArcBasic

In a game made with Create Executable, ReadFile finds files in three places: files the game saved earlier (in the player's data folder), files beside the game, and the files packed inside it. Use the same names as when you run the program from the editor.

See also