INTERFACEFileStatus ; IMPORT FileAttr, Pathname, RCSDate, RCSRevNum, Rd, Thread, Time, Wr; EXCEPTION Error(TEXT); TYPE T <: Public; Public = OBJECT type: Type; name: Pathname.T := NIL; tag: TEXT := NIL; date: RCSDate.T := NIL; revNum: RCSRevNum.T := NIL; revDate: RCSDate.T := NIL; clientAttr: FileAttr.T := NIL; serverAttr: FileAttr.T := NIL; END;
clientAttr
contains the attributes of the client's file if there
is one. serverAttr
contains the attributes of the corresponding
file on the server. In CVS mode, these are identical. But in
checkout mode, clientAttr
represents the checked-out file while
serverAttr
represents the corresponding RCS file on the server.
Type = { DirDown, CheckoutLive, CheckoutDead, FileLive, FileDead, DirUp }; Reader <: RdPublic; RdPublic = OBJECT METHODS version(): CARDINAL; scanTime(): Time.T; status(): CHAR; origin(): TEXT; timeDelta(): Time.T; get(): T RAISES {Error, Rd.EndOfFile, Rd.Failure, Thread.Alerted}; prune(): T RAISES {Error, Rd.EndOfFile, Rd.Failure, Thread.Alerted}; close() RAISES {Rd.Failure, Thread.Alerted}; END; Writer <: WrPublic; WrPublic = OBJECT METHODS version(): CARDINAL; put(fs: T) RAISES {Error, Thread.Alerted, Wr.Failure}; close() RAISES {Thread.Alerted, Wr.Failure}; END; PROCEDURE Compare(a, b: T): [-1..1];
Compares the names lexicographically, except that aFileStatus.T
whose type isType.DirUp
is greater than anything of which it is a proper prefix.
PROCEDURE Equal(a, b: T): BOOLEAN;
Equivalent to Compare(a, b) = 0
.
PROCEDURE FromRd(rd: Rd.T): Reader RAISES {Error, Rd.Failure, Thread.Alerted}; PROCEDURE FromNull(): Reader; PROCEDURE ToWr(wr: Wr.T; scanTime: Time.T): Writer RAISES {Thread.Alerted, Wr.Failure}; END FileStatus.