DIRECTORY FeedbackTypes, InterpressInterpreter, Rope; GGFileOps: CEDAR DEFINITIONS = BEGIN MsgRouter: TYPE = FeedbackTypes.MsgRouter; GetGenericFileName: PROC [opRope, fileName, wDir, defaultExt: Rope.ROPE, illegalExts: LIST OF Rope.ROPE, router: MsgRouter, emergency: BOOL ฌ FALSE] RETURNS [fullName: Rope.ROPE ฌ NIL, success: BOOL ฌ TRUE, versionSpecified: BOOL ฌ FALSE]; FNameToGName: PROC [name: Rope.ROPE] RETURNS [Rope.ROPE]; FilenameMinusExtension: PROC [wholeName: Rope.ROPE] RETURNS [firstPart: Rope.ROPE]; GetInterpressFileName: PROC [opRope, ipName: Rope.ROPE, currentWDir: Rope.ROPE, router: MsgRouter] RETURNS [fullName: Rope.ROPE ฌ NIL, success: BOOL ฌ TRUE]; GetGargoyleFileName: PROC [opRope, ggName: Rope.ROPE, currentWDir: Rope.ROPE, router: MsgRouter, emergency: BOOL ฌ FALSE] RETURNS [fullName: Rope.ROPE ฌ NIL, success: BOOL ฌ TRUE, versionSpecified: BOOL ฌ FALSE]; GetScriptFileName: PROC [opRope, scriptName: Rope.ROPE, currentWDir: Rope.ROPE, router: MsgRouter] RETURNS [fullName: Rope.ROPE ฌ NIL, success: BOOL ฌ TRUE]; OpenInterpressOrComplain: PROC [opRope: Rope.ROPE, router: MsgRouter, fullName: Rope.ROPE] RETURNS [ipMaster: InterpressInterpreter.Master, success: BOOL]; END. œ GGFileOps.mesa Copyright ำ 1986, 1988, 1992 by Xerox Corporation. All rights reserved. Last edited by Bier on August 7, 1987 2:18:34 pm PDT Contents: Routines that manipulate file names or open and close files. Pier, December 12, 1988 4:36:37 pm PST Bier, August 23, 1989 6:38:21 pm PDT Doug Wyatt, April 9, 1992 3:11 pm PDT Generic File Name Operations Given fileName (provided by a user perhaps) and a working directory, expands the filename in that directory, adding the default extension if none was provided. It reports any problems onto the feedback stream unless emergency = TRUE. If there are any problems, success is set to FALSE and a complaint on behalf of the opRope is posted. Otherwise, the resulting full path name is returned. Takes a local name like "[]<>Users>Bier.pa>Gargoyle>Foo" into a global name like "[QueenFish]Users>Bier.pa>Gargoyle>Foo". Convenience File Name Operations for Gargoyle Use [fullName, success, ----] _ GetGenericFileName[opRope, ipName, currentWDir, "IP", LIST["gargoyle", "script", "mesa", "tioga"], feedback]; [fullName, success, versionSpecified] _ GetGenericFileName[opRope, ggName, currentWDir, "gargoyle", LIST["IP", "interpress", "script", "mesa", "tioga"], feedback, emergency]; [fullName, success, ----] _ GetGenericFileName[opRope, scriptName, currentWDir, "script", LIST["gargoyle", "IP", "interpress", "mesa", "tioga"], feedback]; Generic File Opening Operations ส%•NewlineDelimiter –(cedarcode) style™codešœ™Kšœ ฯeœ=™HKšœ4™4KšœG™GK™&K™$K™%K™—šฯk ˜ K˜+—K˜Kšฯn œžœž œž˜$K˜Kšœ žœ˜*K˜K™šŸœžœ+žœžœžœžœ žœžœžœžœžœ žœžœžœžœ˜๏Kšœ‡™‡—š Ÿ œžœ žœžœžœ˜9K™€—Kš Ÿœžœžœžœžœ˜SK˜K™1šŸœžœžœžœžœžœžœ žœžœ˜Kšœฯcœ:žœ3™‰—šŸœžœžœžœ žœžœžœžœžœ žœžœžœžœ˜ิKšœdžœF™ฎ—šŸœžœžœžœžœžœžœ žœžœ˜Kšœ œBžœ=™›—K˜K™Kš Ÿœžœžœ$žœžœ3žœ˜›K˜Kšžœ˜K˜—…—พ