DIRECTORY IO USING [STREAM], YggDID USING[DID], YggInternal USING[FileHandle, FPMFileHandle, LogMap], Rope USING[ROPE]; YggFile: CEDAR DEFINITIONS = BEGIN PageNumber: TYPE = RECORD[INT]; PageCount: TYPE = INT; FileHandle: TYPE = PUBLIC YggInternal.FileHandle; FileHandleRep: TYPE = RECORD [ did: YggDID.DID, component: ATOM, -- which part of the document (contents, links, attributes) fpmFileHandle: YggInternal.FPMFileHandle, logMapHandle: YggInternal.LogMap, locked: BOOL _ FALSE, users: INT _ 0, name: Rope.ROPE _ NIL, fd: INT _ 0, fdLockCount: INT _ 0 ]; Open: PROC [name: Rope.ROPE] RETURNS [FileHandle]; Create: PROC [name: Rope.ROPE, size: PageCount ] RETURNS [FileHandle]; Delete: PROC [file: FileHandle]; Info: PROC [file: FileHandle] RETURNS [size: PageCount, name: Rope.ROPE]; SetSize: PROC [file: FileHandle, size: PageCount]; Read: UNSAFE PROC [file: FileHandle, from: PageNumber, nPages: PageCount, to: LONG POINTER]; Write: PROC [file: FileHandle, to: PageNumber, nPages: PageCount, from: LONG POINTER]; FilesForDID: PROC [did: YggDID.DID] RETURNS [contents, attributes, links: YggFile.FileHandle]; StreamFromOpenFile: PROC [file: YggFile.FileHandle] RETURNS [IO.STREAM]; END. ΆYggFile.mesa Copyright Σ 1988 by Xerox Corporation. All rights reserved. Last Edited by: Bob Hagmann May 26, 1988 3:24:50 pm PDT Get the file objects for the DID. Any or all of these objects may be NIL. For objects with few links, the links are stored in the attributes. For objects with small contents, the contents are stored in the attributes. If there are no attributes, there is no file for them. Creating a file stream Κ3˜Jšœ ™ Jšœ<™<™Icodešœ'™'—J˜šΟk ˜ Kšœœ ˜Kšœœ˜Kšœ œ$˜5šœœœ˜K˜K˜——KšΟnœœ œ˜K˜Kš˜K˜Kšœ œœœ˜Kšœ œœ˜K˜K˜Kšœ œœ˜2šœœœ˜Kšœ˜Kšœ œΟc;˜MKšœ)˜)Kšœ!˜!Kšœœœ˜Kšœœ˜Kšœ  œ˜K˜ K˜K˜—K˜K˜K˜Kšžœœ œœ ˜2K˜Kšžœœ œœ ˜FK˜Kšžœœ˜ K˜Kšžœœœœ˜IK˜Kšžœœ$˜2K˜Kš žœœœ<œœ˜\K˜Kšžœœ<œœ˜VK˜šž œœ œœ3˜^Kšœœ&œΛ™”—head™Kšžœœœ œ˜HK˜K™—K˜K˜Kšœ˜K˜—…—ΐ©