Open the file

Int ires = ts_file(int iFileDescr, "open", string filepath, string what, string mode);


Here:

iFileDescr - file object descriptor received when creating an object with the command object("create"..., filepath - path to the file in the file system, what - what to do if the file is not found ("create" - create a new one, "fail" - issue error and stop, "ignore" - ignore and continue).

mode - file opening mode:

"r" - read only

"w" - write only

"we" - clear file for writing

"rw" - for reading and writing

"a" - adding to the end of the file


ires = ts_file(iFileDescr, "open",filepath,"create","we");