FSRope.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Doug Wyatt, June 24, 1985 6:32:53 pm PDT
OpenFileFromRope uses FSBackdoor to make an FS.OpenFile from the content of a ROPE.
StreamFromRope returns a faster stream than IO.RIS.
DIRECTORY
FS USING [OpenFile],
IO USING [STREAM],
Rope USING [ROPE];
FSRope: CEDAR DEFINITIONS
~ BEGIN
ROPE: TYPE ~ Rope.ROPE;
OpenFile: TYPE ~ FS.OpenFile;
STREAM: TYPE ~ IO.STREAM;
OpenFileFromRope: PROC [rope: ROPE] RETURNS [OpenFile];
Makes a client-provided OpenFile (see FSBackdoor) from the content of the given ROPE.
The resulting file is read-only; it has no name or create time.
StreamFromRope: PROC [rope: ROPE] RETURNS [STREAM];
Returns FS.StreamFromOpenFile[OpenFileFromRope[rope]].
The resulting stream is equivalent to IO.RIS[rope], but faster.
END.