Functions | |
| fcreate (afile) | |
| Create a file on disk. | |
| fopen (afile) | |
| Open file. | |
| fseek (offset, origin) | |
| Reposition the read/write point in file. | |
| fread (char_no) | |
| Read from file. | |
| fwrite (data) | |
| Write to file. | |
| fclose () | |
| Close file. | |
|
|
Close file. Close the previously opened file. |
|
|
Create a file on disk.
Creates a file on disk with afile path and name.
fcreate("myfile.txt") |
|
|
Open file.
Open file afile. Allows full access for others.
fh=fopen("myfile") |
|
|
Read from file. Read up to char_no characters (bytes) from the current position of the open file. Advances read/write point.
a=fread(12) |
|
||||||||||||
|
Reposition the read/write point in file.
Use fseek to reposition the read/write point in open file.
fseek(215,0) |
|
|
Write to file.
Write data at the current position of the open file.
t=fwrite("testing 123"&chr(13)&chr(10)) |