Closing file descriptors
Once all desired operations have been performed on a file descriptor, it must be closed before being discarded. This is accomplished by sending the file descriptor the close message, which deallocates all operating system resources associated with it.
| fd |
(fd := CfsFileDescriptor
open: 'example.txt'
oflag: ORDWR | OCREAT | OTRUNC) isCfsError
ifTrue: [^self error: fd message].
"... Put file operations here ..."
fd close.
"Close file when done"
Last modified date: 01/29/2015