Last updated 21 days ago
Was this helpful?
Closes an on-disk or in-memory file that is open.
FileClose(file=[any])
file
any
true
The file to close.
// Open File var fileObject = fileOpen( "/path/to/file.txt" ); // Perform Actions try { // Read Line writeOutput( fileReadLine( fileObject ) ); } // Error Handling catch (any ex) { // Report Exception writeDump( ex ); }finally { // Always Close // Close File fileClose( fileObject ); }
testFile = fileopen("filepath"),"write"); filewriteline(testfile,"I am the example of fileclose"); fileclose(testfile);