August 1999
Intermediate to advanced
1488 pages
72h 53m
English
file.close()
The close() method of the File object closes the file on which it has been invoked. This method returns true if it was successful and false if it was unsuccessful.
Listing 8.73 shows how to open a file and then close it.
<SERVER>
// Open a log file
var myLog = new File("/data/logs/today.log");
// Open the log file for reading
myLog.open("r");
// Close the file
myLog.close();
</SERVER>
|
Read now
Unlock full access