Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

OPEN

Description

This command can be used to open an existing file for reading.

Parameters

The command needs two arguments. First a handle number in the range from 0 to 100 and next the name (or full path) of a file. If open succeeds, the given handle number must be used in subsequent calls to other operations on that file.

Return Value

ERR_OK (0) if the file was opened successfully.
ERR_ID_USED (27) if the handle is already in use (e.g. by another file).
ERR_FILE_OPEN (32) if the file is aready in use (opened for reading or writing)
ERR_FIL_EXHAUSTED (26) if the system couldn't allocate a file descriptor for that file.
ERR_FR_... (13...25) file system errors if the file system encountered an error.

Example

OPEN 1 hello.txt 

The file hello.txt is opened for reading as handle #1

Remarks

Before an existing file can be read ist must be opened using OPEN. When done, use the CLOSE command to close the file and free the file handle.

 


 

OPEN?

Description

OPEN? can be used to print all file handles that are currently open. A file is in open state, when its handle is in use (activated by OPEN, NEW oer APPD). OPEN? does not require any arguments. The output is a list of all open files separated by comma.

Example

OPEN?

If e.g handles 1,4 and 5 are open, OPEN? prints: 1,4,5