DFCachingUtilities.Mesa
Copyright Ó 1991 by Xerox Corporation. All rights reserved.
Last tweaked by Mike Spreitzer on August 11, 1987 10:08:59 am PDT
Peter B. Kessler, February 10, 1989 5:44:33 pm PST
Eduardo Pelegri-Llopart March 10, 1989 6:12:49 am PST
Willie-s, September 27, 1991 2:14 pm PDT
DIRECTORY DFCachingOperations, DFOperations, DFUtilities, FS, IO, Rope, SymTab;
DFCachingUtilities: CEDAR DEFINITIONS = {OPEN DFCachingOperations;
Date: TYPE ~ DFUtilities.Date;
noDate: Date ~ [omitted];
EnumerationCache: TYPE ~ REF EnumerationCachePrivate;
EnumerationCachePrivate: TYPE;
CreateEnumerationCache: PROC RETURNS [EnumerationCache];
EnumerateDFContents: PROC [df: FileSpec, Consumer: DFConsumer, filter: DFFilter ¬ everything, cache: EnumerationCache ¬ NIL, ConsumeFile: FileConsumer ¬ NIL] RETURNS [stopped, clipped, uncacheable: BOOL ¬ FALSE];
FileSpec: TYPE ~ RECORD [name: ROPE, created: Date ¬ noDate];
SyntaxError: SIGNAL [reason, dfFileName: ROPE, position: INT];
RESUMEing does no further processing of the erroneous file, but otherwise continues.
Miss: SIGNAL [dfFileName, dataFileName: ROPE];
Asked to get dataFileName from dfFileName, but not found.
FSErrorOnDF: SIGNAL [error: FS.ErrorDesc];
This error was raised trying to open a DF file; RESUMEing does no further processing of the troubled file, but otherwise continues.
DFFilter: TYPE ~ RECORD [
comments: BOOL ¬ FALSE,
file: FileFilter ¬ allFiles
];
everything: DFFilter ~ [TRUE];
DFConsumer: TYPE ~ PROC [item: REF ANY] RETURNS [stop, clip, dontCache: BOOL ¬ FALSE];
The type of the parameter will be one of: DirectoryItem, FileItem, ImportsItem, IncludeItem, NestItem, CommentItem, or WhiteSpaceItem.
IF stop, the entire enumeration will be stopped.
IF clip, the rest of the containing DF file will be skipped. A NestItem is contained in the DF file it refers to, and an ImportsItem or an IncludeItem is contained in the DF file making the reference.
IF dontCache, won't consider this enumeration cacheable.
FileConsumer: TYPE ~ PROC [ROPE--short file name without version--];
NestItem: TYPE ~ RECORD [df: FileSpec, filter: DFFilter, bracket: Bracket];
Bracket: TYPE ~ {begin, end};
Side: TYPE ~ {local, remote};
FullEnumerateDFContents: PROC [df: FileSpec, side: Side, Consumer: DFConsumer, filter: DFFilter ¬ everything, cache: EnumerationCache ¬ NIL, ConsumeFile: FileConsumer ¬ NIL] RETURNS [stopped, clipped, uncacheable: BOOL ¬ FALSE];
}.