DIRECTORY FeedbackTypes, Interpress, 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: Interpress.Master, success: BOOL]; END. pGGFileOps.mesa Copyright Ó 1986, 1988 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 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 Ê÷˜Icodešœ™KšœB™BKšœ4™4šœG™GK™&K™$—K™šÏk ˜ Jšœ ˜ —K˜Kšœ œ œ˜$K˜Kšœ œ˜*K˜K™šÏnœœ+œœœœ œœœœœ œœœœ˜ïKšœ‡™‡—š ž œœ œœœ˜9K™€—Jš žœœœœœ˜SK˜K™1šžœœœœœœœ œœ˜KšœÏcœ:œ3™‰—šžœœœœ œœœœœ œœœœ˜ÔKšœdœF™®—šžœœœœœœœ œœ˜KšœŸœBœ=™›—K˜K™Kš žœœœ$œœ(œ˜K˜Kšœ˜K˜—…—¨