openfile(path to file, mode)
Opens the file with path to file (along with the file name). Returns the handle of the open file. Modes to open a file specified by the string:
The mode string specifies the type of access that is requested for the file, as follows:
Opens for reading. If the file does not exist or cannot be found, the function returns an empty handle
Opens an empty file for writing. If the specified file exists, its contents are deleted.
Opens for writing at the end of the file (append) without removing the marker at the end of the file (EOF) before writing new data to the file. Creates a file if it does not exist.
Opens for reading and writing. The file must exist.
Opens an empty file for reading and writing. If the file exists, its contents are deleted.
Opens for reading and appending. The appending operation includes the removal of the EOF marker before writing new data to the file.