The system_fopenRW function opens the file identified by path in read-write mode and returns a valid file descriptor. If the file already exists, system_fopenRW does not truncate it. Use this function to open files that will be read from and written to by your program.
SYS_FILE system_fopenRW(char *path);
The system-independent file descriptor (SYS_FILE) if the open succeeded, or 0 if the open failed.
char *path is the file name.
SYS_FILE fd;fd = system_fopenRO(pathname);if (fd == SYS_ERROR_FD) break;