/
fileClose
fileClose
Description
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.
Functional area
Disk I/O
Command syntax
Syntax
fileClose fileID |
Arguments
Name | Type | Required | Comments |
---|---|---|---|
fileID | int | ID of file previously opened with fileOpen |
Flags
None
Return value
void
Examples
int $fileID; // Obtain file ID earlier do some operation to the file // ... // Close the file fileClose $fileID;
Additional information
Related commands
, multiple selections available,