file_open_read (STRING* name);

Opens a file for reading.

file_open_write (STRING* name);

Opens a file for writing into. If the file does not exist, it is created; otherwise it's previous content is erased.

file_open_append (STRING* name);

Opens a file for appending additional content at the end. If the file does not exist, it is created.

The functions return a file handle - that is a unique number to identify the opened file. The file handle is used by other functions to access that file.

Parameters:

name - file name with or without path, STRING* or char*.

Returns:

File handle, or 0 if the file could not be opened.

Remarks:

Example:

var filehandle_n;
...
filehandle_n = file_open_read("adress.txt"); // opens the file address.txt to read 

See also:

file_close, file_var_read, file_str_read, file_chr_read, file_asc_read, file_find

► latest version online