Supported Platforms: Windows and Mac OS
A file descriptor obtained from the open function.
nil if file-desc is valid; otherwise results in an error message.
After a close, the file descriptor is unchanged but is no longer valid. Data added to an open file is not actually written until the file
The following code counts the number of lines in the file somefile.txt and sets the variable ct equal to that number:
(setq fil "SOMEFILE.TXT")
(setq x (open fil "r") ct 0)
(while (read-line x)
(setq ct (1+ ct))