Use this command to close a file that you have opened using the fileOpen command, after you are done reading from/writing to the file.
Note that many write operations won't get actually written until the file is closed. You should always close your files as loose files can squander your system resources. You may also not see the result of any writeXXXX commands until you close your file. Also, permissions may prevent you from subsequently opening the file.
Disk I/O
fileClose fileID |
Name | Type | Required | Comments |
---|---|---|---|
fileID | int | ID of file previously opened with fileOpen |
None
void
int $fileID;
// Obtain file ID earlier do some operation to the file
// ...
// Close the file
fileClose $fileID;