Name
FILE -- open a file for later use (V2.0)
Synopsis
@FILE id, filename$[, table]
Function
This preprocessor command can be used to open a file so you can use it later. The file will not be loaded completely into memory, it will just be opened as if you called OpenFile(). The file will always be opened in read-only mode. You cannot use this preprocessor command to write to files.

The innovative feature of the @FILE preprocessor command is that when you compile your script, the file will be linked to it and you can still access it in the same way as if it were a normal file on your harddisk, i.e. you can use the normal functions of the DOS library on the file.

The third argument is optional. It is a table that can be used to set further options for the operation. The following fields of the table can be used:

Link:
Set this field to False if you do not want to have this file linked to your executable/applet when you compile your script. This field defaults to True which means that the file is linked to your executable/applet when Hollywood is in compile mode.

Adapter:
This tag allows you to specify one or more file adapters that should be asked to open the specified file. This must be set to a string containing the name(s) of one or more adapter(s). Defaults to default. See Loaders and adapters for details. (V6.0)

If you want to open the file manually, please use the OpenFile() command.

Inputs
id
a value that is used to identify this file later in the code
filename$
the file you want to have opened
table
optional: a table containing further options
Example
@FILE 1, "Highscore.txt"
The declaration above opens the file "Highscore.txt" for further processing in the script.

Show TOC