UXIO.mesa
Copyright Ó 1988, 1989, 1991, 1992 by Xerox Corporation. All rights reserved.
Carl Hauser, February 16, 1989 2:15:13 pm PST
JKF August 1, 1988 11:50:06 am PDT
Willie-s, August 13, 1991 1:04 pm PDT
DIRECTORY
BasicTime USING [GMT],
IO USING [STREAM],
Rope USING [ROPE],
UnixTypes USING [Mode];
UXIO: CEDAR DEFINITIONS
~ BEGIN
Kind: TYPE = {input, output, trace};
CreateStandardStream: PROC [kind: Kind] RETURNS [stream: IO.STREAM];
Access: TYPE = {read, append, write};
defaultMode: UnixTypes.Mode ~ [
owner: [read: true, write: true, exec: false],
group: [read: true, write: true, exec: false],
others: [read: true, write: false, exec: false]
]; -- for all you unreformed C hackers 0664B
CreateFileStream: PROC [name: Rope.ROPE, access: Access, mode: UnixTypes.Mode ¬ defaultMode] RETURNS [stream: IO.STREAM];
Stuff from FS:
OpenFile: TYPE = RECORD [REF];
ErrorGroup: TYPE = {
ok, -- initial group for a new FS.ErrorDesc
bug, -- caused by an internal bug
environment, -- something's wrong in the environment; human intervention required
lock, -- conflict over locks
client, -- illegal operation, probably due to bug in client program
user -- illegal operation, probably due to user action
};
ErrorDesc: TYPE = RECORD [group: ErrorGroup, code: ATOM, explanation: Rope.ROPE]
¬ [ok, NIL, NIL];
Error: ERROR [error: ErrorDesc];
OpenFileFromStream: PROC [self: IO.STREAM] RETURNS [OpenFile];
GetCreateTime: PROC [file: OpenFile] RETURNS [created: BasicTime.GMT];
GetName: PROC [file: OpenFile] RETURNS [fullFName: Rope.ROPE];
Delete: PROC [name: Rope.ROPE];
END.
CHauser February 16, 1989: added mode parameter to CreateFileStream and RopeOpen. Moved defaultMode here from the Impl.