PFSExtras.mesa
Copyright Ó 1991 by Xerox Corporation. All rights reserved.
Michael Plass, October 16, 1991 3:37 pm PDT
Chauser, March 20, 1992 2:08 pm PST
DIRECTORY
PFS USING [OpenFile];
PFSExtras: CEDAR DEFINITIONS
~ BEGIN OPEN PFS;
NewClose: PROC [file: OpenFile, abort: BOOLFALSE];
Releases resources associated with the open file. Any further operations on copies of this PFS.OpenFile will produce a PFS.Error[client, $invalidOpenFile]. The resources can also be released by finalization when all copies of the PFS.OpenFile disappear, but this occurs at an unspecified future time. Further, NewClose is called from the finalizer with abort~TRUE which may lose data. This is considered preferable to calling it with abort~FALSE and causing the finalized file to overwrite a later-written, properly closed file. Thus, it is highly preferable to explicitly Close a file, rather than to rely on finalization.
Client errors: $invalidOpenFile, $notImplemented
User errors: none
END.