DIRECTORY FS USING [ComponentPositions, Error, ExpandName, FileInfo], MakeDo USING [DeclareNodeClass, existsFSWatch, Node, NodeClass, notExistTime, PublicPartsOfNode, Time], MakeDoPorting USING [StartFSWatchers], Rope USING [ROPE, Substr]; MakeDoFiles: CEDAR MONITOR IMPORTS FS, MakeDo, MakeDoPorting, Rope EXPORTS MakeDo = BEGIN OPEN MakeDo; ROPE: TYPE = Rope.ROPE; fileClass: PUBLIC NodeClass _ DeclareNodeClass[ name: "file", CanonizeName: CannonizeFileName, GetInfo: GetFileInfo ]; CannonizeFileName: PROC [random: ROPE] RETURNS [canonical: ROPE] = { ENABLE FS.Error => {canonical _ random; CONTINUE}; full: ROPE; cp: FS.ComponentPositions; [full, cp] _ FS.ExpandName[random]; canonical _ full.Substr[len: cp.ext.start + cp.ext.length]; }; GetFileInfo: PUBLIC PROC [n: Node] RETURNS [created: Time, length: INT] --GetTimeProc-- ~ { name: ROPE = n.PublicPartsOfNode[].name; [created: created, bytes: length] _ FS.FileInfo[name: name, remoteCheck: TRUE --we need this to get the byte count, which we need to check for broken attachments-- !FS.Error => {created _ notExistTime; CONTINUE}]; IF length = -1 THEN created _ notExistTime; RETURN}; IF existsFSWatch THEN MakeDoPorting.StartFSWatchers[]; END. π MakeDoFiles.Mesa Last Edited by: Spreitzer, February 20, 1986 10:01:12 pm PST JKF January 11, 1989 10:10:14 am PST Eduardo Pelegri-Llopart March 17, 1989 8:41:25 am PST Last tweaked by Mike Spreitzer on October 5, 1992 12:35 pm PDT Κδ•NewlineDelimiter – "cedar" style™code™J™—K˜šΟk ˜ Jšœœ3˜;Jšœœ[˜gJšœœ˜&Jšœœœ ˜—K˜šΡbnx œœ˜Kšœœ˜'Kšœ˜Kšœ˜—K˜Kšœœ˜K˜Kšœœœ˜šœ œ˜/K˜ KšΟn œ˜ KšŸœ ˜K˜—K˜š Ÿœœ œœ œ˜DKšœœœ˜2Kšœœ˜ Kšœœ˜Kšœ œ˜#K˜;K˜—K˜š Ÿ œœœ œœΟcœ˜[Kšœœ˜(š œ$œ#œ Uœœ ˜°Kšœœ˜$—Kšœ œ˜+Kšœ˜—K˜Kšœœ!˜6K˜Kšœ˜—…—Ό