<<>> <> <> <> <> <> <<>> 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]; <> 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. <>