6.3.5 Files



editor:find-file-buffer pathname &optional check-function

Returns a buffer associated with the file pathname , reading the file into a new buffer if necessary. The second value returned is T if a new buffer is created, and nil otherwise. If the file already exists in a buffer, its consistency is first checked by means of check-function . If no value is supplied for check-function , editor:check-disk-version-consistent is used.



editor:fast-save-all-buffers &optional ask

Saves all modified buffers which are associated with a file. If ask is non- nil then confirmation is asked for before saving each buffer. If ask is not set, all buffers are saved without further prompting.

Unlike the editor command Save All Files this function can be run without any window interaction. It is thus suitable for use in code which does not intend to allow the user to leave any buffers unsaved, and from the console if it is necessary to save buffers without re-entering the full window system.



editor:check-disk-version-consistent pathname buffer

Checks that the date of the file pathname is not more recent than the last time buffer was saved. If pathname is more recent, the user is prompted on how to proceed. Returns t if there is no need to read the file from disk and nil if it should be read from disk.



editor:buffer-pathname buffer

Returns the pathname of the file associated with buffer . If no file is associated with buffer , nil is returned.

LispWorks Editor User Guide (Windows version) - 23 Mar 2005