DIRECTORY BasicTime USING [GMT], IO USING [STREAM], PFSNames USING [Version], RedBlackTree USING [Compare, GetKey, Table], Rope USING [ROPE]; TarTrickle: CEDAR DEFINITIONS ~ { OPEN Rope; Translation: TYPE ~ RECORD [ prefix: ROPE, -- prefix (pseudo server equiv) in filenames translation: ROPE, -- prefix value for (truthful) source supress: ROPE -- prefix path for source to supress ]; TCType: TYPE ~ { fullDirectory, oneDF, allDFs }; TCInfo: TYPE ~ REF TCInfoRec; TCInfoRec: TYPE ~ RECORD [ tarFileName: ROPE, tcType: TCType _ fullDirectory, fixes: LIST OF Translation _ NIL, arg: ROPE ]; FileEntryState: TYPE ~ { init, doingHeader, copying, moved }; FileEntry: TYPE ~ REF FileEntryRep; FileEntryRep: TYPE ~ RECORD [ name: ROPE, -- actual file found date: BasicTime.GMT, -- create date of the file version: PFSNames.Version, -- version of file (from repository) len: INT, -- byte count of the file (useful redundancy) fileType: CARD32, -- PFS.FileType state: FileEntryState -- indicates the state of the file (obvious) ]; EnumerateFiles: PROC [pattern: ROPE, out: IO.STREAM] RETURNS [table: RedBlackTree.Table, filesSeen: INT _ 0, bytesSeen: INT _ 0]; EnumerateDFs: PROC [pattern: ROPE, tcInfo: TCInfo, out: IO.STREAM, test: BOOL _ FALSE] RETURNS [table: RedBlackTree.Table, filesSeen: INT _ 0]; ExpandInfo: PROC [table: RedBlackTree.Table, out: IO.STREAM] RETURNS [bytesSeen: INT _ 0]; BumpCounter: PROC [out: IO.STREAM, num: INT] RETURNS [res: INT]; GetKey: RedBlackTree.GetKey; Compare: RedBlackTree.Compare; }. ` TarTrickle.mesa Copyright Σ 1990 by Xerox Corporation. All rights reserved. Bill Jackson (bj), May 21, 1990 4:31 pm PDT Types key: REF, -- RedBlackTree.Key, either ROPE or PFS.PATH Operations accumulate list of files to be operated upon by recursing thru directory tree accumulate list of files to be operated upon by recursing thru df structure fill in the date/version information for all entries increment counter, putting mark(s) on stream when appropriate returns data as key compares key (rope, PATH, or FileEntry) with data (FileEntry) provides case insensitive (Rope.Compare) ordering Κε•NewlineDelimiter ™codešœ™K™