After an FD is obtained, you can read and write to the file according to the mode that was used to open it.
For example, to read from the program.cfg file opened above, you can use the read function.
tmpbuf := array[] of byte; n = sys->read(cfgfd, tmpbuf, 80);To write the bytes read to the
file.tmp created above, you can use the write function:
write(tmp, tmpbuf, 80);