Inter-OfficeMemorandumToCedarInterestDateOct1,1982FromDaveGifford,revisedbyMDSLocationPaloAltoSubjectCIFSManual(3.4)OrganizationPARC/CSLXEROXFiledon:[Indigo]Documentation>CIFSManual.(tiogapress)CedarInterimFileSystemAbstractTheCedarInterimFileSystemprovidesbasicfilestorageanddirectoryservicesinsupportoftheCedarProgrammingEnvironment.ThismanualdescribestheCedarInterimFileSystem'sconcepts,facilities,andinterfaceintwoparts.ThefirstpartofthemanualisintendedforthecasualCedaruseranddescribesbasicfilesystemconcepts.ThesecondpartisintendedforprogrammerswhowillmakedirectuseoftheCIFSprogramminginterface.TheappendixcontainsanexampleprogramthatusesCIFS.PartA:UsersGuideA.1ConceptsCIFSisaclientfilesystem;itrunswithCedarandprovidesaunifiedviewofserverfilesystemssuchasIFS,Juniper,andMaxc.Likeotherfilesystems,CIFSimplementsthefileasthebasicobjectforlong-terminformationstorage.InCIFSafileisanarrayof512bytepages.Clientscancreate,read,alter,anddeletefiles.Filesarecatalogedindirectories.Adirectoryisasetofentries,andeveryentryhasanentrynamethatisuniquewithinitsdirectory.Anentrydescribeseitherafile,adirectory,oralink(linkswillbediscussedlater).Everyentrycanincludeacomment,whichisatextstringthatisnotinterpretedbyCIFS.Likefiles,directoriescanbecreated,examined,altered,anddeletedbyaclient.Wheneveradirectoryiscreateditmustbepermanentlycatalogedinasingleparentdirectory.Thisrequirementcausesdirectoriestobearrangedinatree,andappropriatelyenoughtherootofthetreeiscalled1pqa ! p ]]+]6]8:3 YY $&6Y@[YCt VV+V 6Vr{NVp DY DY.6s$8"[+0&t ,Xp ) t&), 039u>@LEgG/ (* C "P%Z*40 2\6d;I>C & r2L#&)d,P.0{5m6<>AUEw $#)),1g4b5;> F #48z M ( /17<>D !|ut u ~8p ~uKpUn#&M*-T24D9J>BGDp O]"K%)`+1h5@ <u?PO?OpAOBmOCF V &j(9+-/}026^8:=B]G { y awu'yy p y!y#(*O+{-u/Ty/yp3$y4y6:r>@uBqyC yEp | "`$(G.023G6 73 =]?"@LCF + l"'u(+){+p.!+.+24W5v8#;>@B| & "(#)/4O6;=>B } '-/l0u4U 5 8rp= > A 5 st!?"$6'a*( 27:=>AJDEv)TVm$  Z Y!"%& ,./26|9';A E=( r]u(,(p((J!B%#'therootdirectory.Everydirectoryandfilecanbereachedfromtherootdirectory.Anobject'sabsolutepathnamespecifiesthewaytheobjectisreachedfromtheroot.Thus,absolutepathnamesareunambiguous.Examplesofabsolutepathnamesare:/indigo/cedar/top/rigging.df!2/phylum/lad/bookpress/Byconventiontheleadingslashonthesenamesmeanstheyarerelativetotherootdirectory.SubsequentslashescauseCIFStowalkdownthetreeofdirectories.Directoriesthatarechildrenoftherootdirectorycorrespondtofileservers.Thiscorrespondencedetermineswhereachildoftherootanditsdescendantsarephysicallystored.Thus,/iris/mesaisstoredonthefileservernamediris.Alinkisadirectoryentrythatpointstoanotherdirectoryentry.Theentrypointedtoiscalledthetargetofthelink.Linksarenamedbyabsolutepathnamesinthesamemannerasfilesanddirectories.Anexampleofalinkis:/ivy/cassatt/history/paint.tiogatarget/louvre/renoir/paint.tiogaAreferenceto/ivy/cassatt/history/paint.tiogawillberesolvedto/louvre/renoir/paint.tiogabyCIFS.Oncealinkisestablisheditstargetcanbechanged.Thus,linksarethebasicindirectionmechanismofCIFS.CIFSrestrictslinkstopointatfileentries.Thiswouldbetheendoftheconceptssectionexceptthatitisverycumbersometoalwaystypeabsolutepathnames.Thus,CIFShasamechanismcalledpathnameexpansionbuiltintoitthatallowsclientstoabbreviatenames.Ifapathnamedoesnotbeginwithslashitiscalledarelativepathname.Suchnamesareinterpretedrelativetoacontextthatincludessearchrules(describedlater)andasingleworkingdirectory.Relativepathnamesareinterpretedrelativetotheworkingdirectory.Forexample,iftheworkingdirectoryis/ivy/jeffersonthentherelativepathnamecongress/constitution.tiogaisexpandedbyCIFStotheabsolutepathname/ivy/jefferson/congress/constitution.tiogaInadditiontotraversingthetreeofdirectoriesoutfromtherootdirectoryCIFSisalsowillingtoworktheotherway.ThebackslashcharactercausesCIFStotraverseinreverse.Considerthepathname:/ivy/jefferson\\indigo/franklin/kite.tiogaThefirstbackslashtellsCIFStogobackupto/ivyandthesecondbackslashcausesittogobackonemoreleveltotheroot.Thisfacilityisintendedforuseinrelativepathnames.Forexample,iftheworkingdirectoryis/ivy/freudthenCIFSexpands\skinner/rat.mesato:/ivy/skinner/rat.mesaAclientcanthusgoupanddownthedirectorytreeandusetheworkingdirectoryasaconvenientreferencepoint.Thereisonefinalmechanismthatisbroughtintoplayforrelativepathnamesthatonlyconsistofanentryname(e.g.thepathletter.tioga).Ifthepathnamesafile,andthefileisnotfoundintheworkingdirectory,alistofotherdirectoriesistriedinturn.Thislistofdirectoriesiscalledthesearchrules.Logicallytheworkingdirectoryisthefirstmemberofthesearchrulesbecauseitistriedbeforeanyoftheotherdirectories.Forexample,ifthesearchrulesare:/ivy/ravel(workingdirectory)/ivy/beethoven[1]/ivy/debussy[2]2p b)u b)b)pb)_b)U"'$'G)+04L69 _u__p_ /_%'h*2,017:Y<@XD  ^k &'-70]4o[oY V X!#',0046;=@9Cf T U !$(+(-/ R_   K"%+ 247 <? P ? #&U(5 /26 8=uAPB4PpH#PHP O7u 3O Op Lu6LLpLeLj^#%*0W47;"@*AC<G/u JpJJMbm$&,/4a6F8<ACF IC 8!oFu1DEpDEDE A&uA[Ap(A)A+,2Pu3A4ApCADbAE @<Ul c-!$x&X,0H358;| B\ >wg $`%(b ;6Gv%*n.13B47 @,AF :Q4s"~% &N-u1:Q2X:Q48p?:Q?:QBbERF 86 "$m%(,/2[619W<> ?CuD8ES8 7p77l &*,u-7.7p273S75u;E7;7?pB7Cd7 5[c0pur5[Y5[ p$f5[%o5[)-1v3 ; ?AD8 3 !&&,u.3/33 p7;373:=FBfEu 2 p2 42 =$~&y*.+.<36o/* -  *!i#1 ),r/2V5S;3>@qCLG +g"z"(|,0Z278>=DFh )o'A* $rG "&J(gu*$*$p-$-$/2,6<A5BDNFH #cPqO!s&'y-?/238;A C !snu!s!sp#!s#!s&*au/!s0C!sp:!s;!so u:|F"$q*C-/2249?AiB  O)L"!#(+.159=^@3CSG 9fu p%D&(1*-23358;=>AlE~G/ $ m! (v*-g/43S68: ACG/u YpYBYI#+)*- /5z7I9>AFH# D &&(.02c69o3 &3, o .q o 5 .q 5v) zTVm$AD8="P 1 B=, $)M*,T/4068;R? F=   nd* ?*%  ', ',=u v p!/=u p<:k[2=  : )u= 5 v) TVm$Thenemperor.musicwouldbeexpandedto/ivy/beethoven/emperor.musicandLaMer.musicwouldbeexpandedto/ivy/debussy/LaMer.musicassumingmymusicalhistoryiscorrect.A.2PragmaticsItwouldbeniceifyoudidnotneedtoknowanythingabouthowCIFSworked,butalasthereareafewimportantthingsthatwillhelpyoucomprehendwhatisgoingonwhensomethingfunnyhappens.CIFSmakescopiesoffilesanddirectoriesonthelocaldiskofthemachineyouareusing.Thesecopiesarecatalogedbyaninvisibledirectorycalledthelocalsystemdirectory(orLSD).ThelsdcommandcanbeusedtolistthecontentsoftheLSD.Whenyoualterafile,thechangesarenotreflectedatthefile'spermanenthomeuntilyouissueabackupcommand(seeSectionA.3).Thishastwoimportantconsequences.First,iftwopeoplemodifyafileorupdateadirectoryatthesametimethelastonetodoabackupwins.Thecatalogcommandwillfixanydirectoryproblemsthatmightresult,butingeneralconcurrentmodificationofafileoradirectoryisnotagoodidea.Second,ifyoumodifyafilethatyoucannotwriteonCIFSwillnotcomplainatthetime.Whenbackuprunsitwillbeunabletocopyyourmodificationtothefile'spermanenthome,andyouwillhavetocopyyourmodificationsoutofthefileandusetheresetcommandtoflushthechanges.CIFSsupplementsthedirectorysystemsoffileserverswithitsownsetofdirectories.Iftheabsolutepathnameofadirectoryispath,thentheCIFSdirectoryisstoredinafilecalledpath/dir.bt.ThecatalogcommandwillinitializeexistingdirectoriesforusewithCIFS.ThemkdircommandautomaticallyinitializesCIFSdirectoriesandcatalogisnotneededinthiscase.Inordertousefilesinnon-CIFSdirectoriesthefile'sabsolutepathnamemustbegiven.Forexample:/iris/redell/pilot/paper.pressForcompatibility,thedirectory/localreferstothePilotCommonSoftwareDirectory.A.3HowtouseCIFSCIFSisintheCedarbootfile.TouseCIFScommands,type:runfilesystemcommandsTheUserExecwillthenunderstandthefollowingsetofsimplefilesystemcommands:asrpathAddsthedirectorypathtothebeginningofthesearchrules.backupCopiesallofthefilesthathavebeenmodifiedtopermanentstorage.catalogpathInitializeaCIFSdirectorysystemonthedirectorytreethatstartsatpath.IftherealreadyisaCIFSdirectorysystem,itischeckedforconsistencyandrepairedifnecessary.commentpathcommentReplacesthecommentontheentrypathbycomment.Ifcommentisnotspecified,thecommentonpathisdeleted.3p b)uLb)b) p3b)1b)aR%o_ ],ue],X], p],],$ oZ X0   u U8 p S3$QA/E -#%7(.259=>}@CG; QV!e$' /3)48:>E O Mfp w '3)G+/2366;>@E Kd#F)2-Du/K0!K37p=BK=K?DutGhKGKp Ju!&(:* G"O$'',.t04);>BBEHet EpEE$)'g),3S <@BDE DJiJq"A#&4),/014W68t9/DJ9DJp=DJ>DJAtDDJEbDJp B j&{)R-S14 5: A @qk #',.$0569T<,>ADG ?T[lbK#=t'N?T'?Tp+?T,|?T/ 0Y249f; >WA =_ #!$'E*,?/2 ;]=?AD`G <t <<pi<<y K 9N *u 4%&)-02e5U7^9 @fAD  7P{Nu7k7p I7!&7$N&*d07157x8; u?7?7 pET7F7t 69p69n69 !h& -0W3 6;t>69@69pC.69C69 4  3 %t(M4(4p- 4-4.157x: 2d" )u,/r5 8_`?A6D1{M# $v%+0-m 47X<>' toZwUZZop1  "%iu) ) p,Q - u.m / p3 5P u6 7 p< =; >e@ G/1 59u@ 5 5pR 5 5v)TVm$u pppcdpathChangestheworkingdirectorytobepath.CIFSDeletepathIfpathisafileitisdeleted.Ifpathisalinkitisdeletedbutitstargetisnot.IfpathisadirectoryanerrorissignalledddpathDeletesthedirectorypath.dsrpathDeletesthedirectorypathfromthesearchrules.groupresetprefixResetallfilesthatwhosenamesbeginwithprefix.linkpathtargetCreatesalinkcalledpath,andmakesitstargetpathtarget.ls[pattern][-dirpath][-patpattern]Listtheentriesindirectorypath.If-dirisnotspecified,theworkingdirectoryisassumed.Thepatterncancontainregularcharactersandthereservedcharacters"*"(matchanysequenceofcharacters)and"#"(matchanyonecharacter).lsdListthecontentsofthelocalsystemdirectory.Thelistingisprintedinthefollowingformat:AbsolutePathname(timelastmodified){Dirty}If{Dirty}isnotpresent,thenthelocalcopyofthefilehasnotbeenmodified.lsrListthesearchrules.makepathAsimplewayofcreatingatextfile.mkdirpathCreatesadirectorycalledpath.pbfPrintsthenumberofpagesthatCIFSwilltrytokeepfree.pwdPrintstheworkingdirectory.CIFSRenamefromPathtoPathRenamesthefilenamedfromPathtobenamedtoPath.resetabsolutePathDiscardsanyupdatesthathavebeenmadetoabsolutePaththathavenotbeenpermanentlyrecordedwithbackup.absolutePathmustbeanabsolutepathname.sbfpages4tob$wIb$b$p1_v%H&u(_)_to]* w]*]*p1ZuZ`ZpZ!Z&Mn$u%Z&GZp(Z)Z*+4-/P0589=?%BouCZDZpFZG`ZHe1YetoVwTVVp1T zuLT T toQwQhQp1OzuLOOp"^O"O%($,^u/6OtoL w'LLp1J!&)u,J-JtoGw0GGJp1EDuEEp!E"rE%))b+</u2DE2EtoBwBTBtB\BwxB(B Fp1@ >Iu#@ #@ p%@ &@ (b+,f. 471<~BFC1>x=/"& -0s38 ?TBF1< #p&+S-0 to:Tp17%YD!%O) 148e:? @C|16/u3 i#&w,kp114)!$'P*-/24j69T<to.p1,:Rto)w))p1'?"!#%to$wZ$ $p1"DDu" "D""Dtop1I(l#7&),e.0<3top1O( to wZp1T#u!rT!Tp'uT'T)#+u/T0 Ttow| p1YOX"%O(,Ou-Y.Y p5Y6XY8;>GA 1 t  p5 u !E p( ) ,-/5V8|to 5w 5Q 5v)TVm$"wz**p ({u(p(p ( s(!#u()(((t%w Z% % p #lG'!%u'#(0# p/#0 #2{58Z; C !ot !o!op!ouh!o!o pq!o!o "()SetbasefreepagessetsthenumberofpagesthatCIFSwilltrytokeepfree.Ifnoargumentissupplied,CIFSwillensurethatthereareenoughfreepagesaccordingtothecurrentsetting.SettingthenumberofbasefreepagestobemorethanthesizeofthelocaldiskwillcauseCIFSnottocachefiles.swapfileafilebSwapthecontentsoffileaandfileb.wherepathAppliespathnameexpansiontopathandprintstheresult.typepathTypesthecontentsofpath.unlockEmergencybruteforceunlockofallfiles.A.4TheSalvagerCIFSincludesasalvagerthatwillrebuildtheLSDfromtheleaderpagesofallfilesonthedisk.ThesalvagerisinvokedbybootingCedarwiththe"l"switchandansweringthequestionsintheobviousway.SalvagingcantakeseveralminutesonaDorado.PartB:ProgrammersGuideTheprogrammer'sinterfacetoCIFSisimplementedbythreedefinitionsfiles:CIFS,CIFSFeedback,andFileLookup.Thesefilesarereproducedbelow,withthecommentsinthefilesservingasitsdocumentation.ThefileCIFScontainstheinterfacesofmostusetotheapplicationsprogrammer.CIFSFeedbackisforusebythe"Watcher".FileLookupprovidesaccesstoagenerallyusefulsinglepacketprotocolforinterrogatingIFSfileservers.--CIFS.mesaJune2,19826:55pm--InterfacetotheCedarInterimFileSystem.--CodedAugust,1981byD.Gifford--Lasteditedby--MBrownonAugust30,19821:06pmDIRECTORYAscii:TYPEUSING[NUL],File:TYPEUSING[Capability],Rope:TYPEUSING[ROPE];CIFS:CEDARDEFINITIONS={--PublicProcedures--OperationsthateveryonewillwanttouseOpenFile:TYPE=REFFileObject;FileObject:TYPE;--Thistyperepresentsanopenfile.--IfaninstanceisnotNIL,itrepresentsanopenfile.Context:TYPE=REFContextObj;--IfNILissuppliedasacontext,CIFSwilluseitsdefaultcontext5p1b)ts# W"')H,/3A579o<@A{Ce1` w%'+.3(6: @nBAD1^=#%(+/x123.69= uN> uN>toKp1IBX %&(u F8p DFw.f"&')x,0Z27:<>ACFI Br"'&*V,/(3w6C<?CElG/ @A!;%+- .3t >y p ;o ?"$3 ,n.S1 8;? :T~  '.! (-|03)9;>AEG 8 I %m' ./3$57S9 AU 7 s T ' /s48:;AE 5^ w #% 0a%  .%!# -% +g%)X )-!:$I $ #  !q4o L wu |"a %%i |% + #% *Mz_  6P` "E/6a A! (* -| gy  566t#'*+,.z3#v) TVm$)l=C# $:|w=Au  =? F=:E9  0]E7]   E5 s=2Q k  =. =-E dlE)  K E(: N&  qaN$ G 7e& "& E! #d N G YU-Z "%/' +Es 3Eh E ] ContextObj:TYPE;Mode:TYPE=CARDINAL;--anycombinationofmodescanbeused,butusefulsets--ofcombinatatonsare:--{read},{write},{write,create},{write,replace},{write,create,replace}--dontCheckcanbeincludedinanyofthesesetsread:Mode=1;--readmodesetsanon-exclusivelockonthefilewrite:Mode=2;--writemodesetsanexclusivelockonthefile--includesreadbydefaultcreate:Mode=4;--createmodewillcreateafileifitdoesn'texist--normallywriteandcreatemodesareusedtogetherreplace:Mode=8;--Imaginethatthefileopenedis"foo"--andthefilethat"foo"isstoredinisF--replacemodedoesthefollowing:--(1)itcreatesanewemptyfileF'atOpentime--(2)thisisthefilereturnedtotheclientbyGetFC--(3)atclosetimeitmakes"foo"pointtoF'--(4)Fismadetemporarysoitwillbedeletedatthe--nextbootdontCheck:Mode=16;--Iffileisonthelocaldisk,assumethatthecopyiscurrentanddon't--checktheremotesever--Usefulasaperformanceoptimizationforfilesthatare"immutable"maxPath:CARDINAL=200;--Maximumpathlengthis200charactersmaxComment:CARDINAL=300;--Maximumcommentlengthis300charactersClose:PROC[fh:OpenFile];--Closeafile--Errors:NoneConnect:PROC[name,password:Rope.ROPE];--Setconnectcredentials--Errors:NoneCreateDir:PROC[name:Rope.ROPE,c:Context_NIL];--Createadirectory--Errors:{illegalFileName,localDiskFull,noSuchDirectory,ConnectionErrors,--CredentialsErrors}Delete:PROC[name:Rope.ROPE,c:Context_NIL];--Deleteafile--FilesarecreatedbyOpen--Errors:{illegalFileName,noSuchFile,requestRefused,localDiskFull,--fileBusy,noSuchDirectory,ConnectionErrors,CredentialsErrors}6p a  \1^C Z- u"Z$K'*`.y YL-   WB#M'-2 6z U-) L!$&S) TVJL1R6P& #&(* QO`6*!$&)VM6 L24Jj68"O#%)H6; >$&*' GEt6[$"#oC6MY#%'B%6Y @~6]:dR "$&Q*>6]j3 "}$(*=/6]] #')4;6]5!["%]'N,"-9>N 89 ,.66!9 %G(*u-/33646w3C6T~  '{),/t1 /).M>L #M , d!I*>".#&/ 'j & >2$a> !# k> > u   %'z,.>>'> )4 1 #%t*,8>> ;> (2  g"[-v)TVm$&V- 3\V+e ~ "S-GV) RE&k $0 j#:$V$ 3]V#  )}FBV!p ~ !++ V RDeleteDir:PROC[name:Rope.ROPE,c:Context_NIL];--Deleteadirectory--Errors:{noSuchDirectory,directoryNotEmpty,ConnectionErrors,CredentialsErrors}GetFC:PROC[fh:OpenFile]RETURNS[fc:File.Capability];--ReturnsthePilotFileCapabilityofanopenfile--Errors:NoneGetPathname:PROC[fh:OpenFile]RETURNS[path:Rope.ROPE];--Returnsthepathnameofanopenfile--Errors:NoneOpen:PROC[name:Rope.ROPE,mode:Mode,c:Context_NIL]RETURNS[fh:OpenFile];--Openafile--Errors:{ConnectionErrors,CredentialsErrors,FileErrors,localDiskFull,fileBusy,--noSuchDirectory}Rename:PROC[from:Rope.ROPE,to:Rope.ROPE,c:Context_NIL];--Renameafile--Errors:{ConnectionErrors,CredentialsErrors,FileErrors,localDiskFull,fileBusy,--noSuchDirectory,fileAlreadyExists}Swap:PROC[filea:Rope.ROPE,fileb:Rope.ROPE,c:Context_NIL];--Swapthecontentsoffileaandfileb--Errors:{ConnectionErrors,CredentialsErrors,FileErrors,localDiskFull,fileBusy,--noSuchDirectory}--PublicProcedures--OperationsthatsomepeoplewillwanttouseAddSearchRule:PROC[path:Rope.ROPE,before:BOOLEAN,c:Context_NIL];--Addasearchrule--IfbeforeisTitwilladditbeforetheothersearchrules--Errors:{ConnectionErrors,CredentialsErrors,localDiskFull,noSuchDirectory}CopyContext:PROC[from:Context_NIL]RETURNS[c:Context];--Copyacontext--Iffromisomitted,CopyContextwillreturnacopyofthedefault--context.--Errors:NoneCreateContext:PROCRETURNS[c:Context];--Createanewcontextfortheinterpretationofnames--The"JerryBrown"Operation--Errors:NoneCreateLink:PROC[path,targetPath:Rope.ROPE,c:Context_NIL];--causespathtopointtotargetPath--wheneverpathisusedasafilename,itwillberesolvedto7p b!   %'z,.?`x>^>!.9m [~GY,X->v %'O)@,V> S3 JQ,/ O>v7 "&SN8> Jj #@'+-24FI>, G> 3E>" -U 48 = DD> @ Q $& .057I?J>=>" -U 48 = ;>2 8U@ "z&$ .^/5.66>S{!$A5V>" -U 48 = 3> 0\%i .% + "&' +b  (-5u7 Y(>{= !&E(,D0~&h>" -U 6* # K$&!n,(>>' %i(,C-m02x4t>> z H,()> #- +->Dd> a $ ,.35Q >xM  5>sA "$(),.3v)TVm$cV' 3\J\ $[&V&A  V$ E!B `B J %',S-V -{) V (~!)"%*',VC V % .V RE GCz--targetPath--Errors:{ConnectionErrors,CredentialsErrors,localDiskFull,noSuchDirectory,--linkAlreadyExists}DeleteContext:PROC[c:Context_NIL];--Destroyacontextfortheinterpretationofnames.--The"EdwardKennedy"Operation--Errors:NoneDeleteSearchRule:PROC[path:Rope.ROPE,c:Context_NIL];--Deleteasearchrule--Errors:NoneEProc:TYPE=PROC[name,link,comment:REFTEXT]RETURNS[stop:BOOLEAN];--Procedurethatiscalledfordirenumeration--nameistheentryname--iflink.length#0thenlinkisthepaththatnamewillberesolvedto--ifcomment.length#0thencommentisacommentfornameEnumerate:PROC[dir:Rope.ROPE,pattern:Rope.ROPE,p:EProc,c:Context_NIL];--Enumeratethecontentsofadirectory--patterncancontain"*"and"#"--apatternof"*"enumeratestheentiredirectory.--Ifdir=NILordir=""Enumerateassumesthewdir--Errors:{ConnectionErrors,CredentialsErrors,localDiskFull,noSuchDirectory}GetSearchRules:PROC[c:Context_NIL]RETURNS[LISTOFRope.ROPE];--Returnsthelistofpathsinthesearchrules--Errors:NoneGetWDir:PROC[c:Context_NIL]RETURNS[path:Rope.ROPE];--Returnthepathoftheworkingdirectory--Errors:NoneLogin:PROC[name,password:Rope.ROPE];--Setcredentials--Errors:NoneSetDefaultContext:PROC[c:Context];--Setthedefaultcontext--Errors:NoneSetComment:PROC[path,comment:Rope.ROPE,c:Context_NIL];--Setsthecommentonthespecifiedpathtobecomment--Errors:{ConnectionErrors,CredentialsErrors,FileErrors,localDiskFull,--noSuchDirectory}SetWDir:PROC[path:Rope.ROPE,c:Context_NIL];--Setworkingdirectory--Errors:{ConnectionErrors,CredentialsErrors,localDiskFull,--noSuchDirectory}8pb)> `>" -U 6*^ [ H"$xY>ji! )+^X3> V> S8f! *+02oQ>O> LGtY!D$i*.GJ,IC>":$m G>j]E> !|"%G(n+<.139DH>!')a*02 @ 6 $*' 2a4&8:.?f@?M>E !"=>g";>h'u "%) :R>!(-0^8>" -U 6* 5WG#%v3,. 2>v w"%$(0\> - Y!+a,/ )>Qx1$(> $1! #> !l> . *q>> v v%J -/4T5>" &)+-r$>" -U 48 {> )fi $&<+s- > >" -U  .>v)TVm$g5V. E+ uW &',.pV)   ;"a$&V(@ % , V& E#2  2$%V!  -V % V$ = = K!VE E #%wN--PublicProcedures--OperationsthathardlyanyonewillwanttouseExpand:PROC[name:Rope.ROPE,c:Context_NIL]RETURNS[path:Rope.ROPE];--Expandsanameintoafullpathname--MayraiseCIFS.Errorifthefileisnotinthedir--system.--Errors:{ConnectionErrors,CredentialsErrors,FileErrors,localDiskFull,--noSuchDirectory}ExplicitBackup:PROC[name:Rope.ROPE,c:Context_NIL]RETURNS[version:INT];--Explicitbackupofthenamedfiletoitsremoteserverhome--Theserver'sversionnumberforthebackingfileisreturned--IfnamehasaversionnumberthenExplicitBackupwilluse--thatnumberforthebackingfile--Errors:{ConnectionErrors,CredentialsErrors,FileErrors,fileBusy}GetBaseFreeSpace:PROCRETURNS[pages:INT];--Getsthenumberoffreepagesthatshouldbemaintained--onthelocaldisk--Errors:NoneOpenButDontHandleError:PROC[name:Rope.ROPE,mode:Mode,c:Context_NIL]RETURNS[fh:OpenFile];--Openafile--SameasOpen,exceptthatitwillnotautomaticallyhandle--acredentialerror.--Errors:{ConnectionErrors,CredentialsErrors,FileErrors,localDiskFull,fileBusy,--noSuchDirectory}Reset:PROC[name:Rope.ROPE,c:Context_NIL];--Resetafilefromitsbackingstore--namemustbeanabsolutepathname--Errors:{noSuchFile}SetBaseFreeSpace:PROC[pages:INT_0];--Setsthenumberoffreepagesthatshouldbemaintained--onthelocaldisk--Ifpagesisomitted,CIFSwilljustensurethatthereare--enoughfreepagesaccordingtothecurrentsetting--Errors:None--Exceptionalconditions--Unfortunately,everyonehastoknowaboutthese--IneachCIFScallthemostlikelyerrorsarelisted.However,aclient--shouldbepreparedforvariantofErrorCode.Themessage"error"is--essential,andshouldbeshowntotheuser.HandleError:PROC[code:ErrorCode,error:Rope.ROPE,reply:CHARACTER_Ascii.NUL]RETURNS[resume:BOOLEAN];--Attemptstohandleacredentialerror.Theusageofthisprocedureis:9p a%i _% +H!#'( \FR $&$+[,Z,/ Y$>"O%uWv>n  F"%&z(*,UGT>" -U 48 Rm> O' (*/1YMc,K>T)B#&2').b2nJ>"%1',/0HY>$'9 03kFZ#{D>" -U 48 AC )?> $a'0+- >E>E<> 9;#"' /4H8::?r@7, 5> 341>!#D%(d 02>h 0>" -U 48 = /(> +k #A$*+*> 3"(p>fWG!$&> #fp "%&!>"g 4#&+I-9  >E\>e!#&g*-1$>(#$'+> %  % iE!h%')  H%%d "&))-35  %c!=" *-27 % )!i#%w ? &) 2)6+?AH  , 56)^ #(,+.03*9v)TVm$  OT#[&))V0\ O>$gV. =+b 3 =) I!=( hSnd!&>,r-=&h / 0 #:&+j0<=$ <E!n >a "~ *.8K9 N`Nf m #'^)+2;Nt1--CIFS.Operation[args!--CIFS.Error=>{IFCIFS.HandleError[code,error,reply]THENRESUME}];--NOTE:TheabovecodeisincludedinCIFS,soaclientdoesnothave--towriteit.Thisprocedureisexportedonlyforcompleteness.Error:SIGNAL[code:ErrorCode,error:Rope.ROPE,reply:CHARACTER_Ascii.NUL];--errorusuallycontainsaninterestingmessage--replyisthecodepassedfromserver(seeSTPReplyCode.mesa)ErrorCode:TYPE={--connectionerrorsnoSuchHost,noRouteToNetwork,noNameLookupResponse,alreadyAConnection,noConnection,connectionClosed,connectionRejected,connectionTimedOut,--credentialserrorsaccessDenied,illegalUserName,illegalUserPassword,illegalUserAccount,illegalConnectName,illegalConnectPassword,credentialsMissing,--protocolerrorsprotocolError,--fileerrorsillegalFileName,noSuchFile,requestRefused,--remotestreamerrorsaccessError,--catchallundefinedError,--localdiskfulllocalDiskFull,--fileislockedfileBusy,--filealreadyexistsforarenamecommandfileAlreadyExists,--directorydoesnotexistnoSuchDirectory,--directorycontainsfilesandcannotbedeleteddirectoryNotEmpty,--linkalradyexistslinkAlreadyExists};ConnectionErrors:TYPE=ErrorCode[noSuchHost..connectionTimedOut];CredentialsErrors:TYPE=ErrorCode[accessDenied..credentialsMissing];FileErrors:TYPE=ErrorCode[illegalFileName..requestRefused];}..--CIFSFeedback.mesa--InterfaceforCIFStoreportSTPactivities--CodedbyM.D.Schroeder,July16,19821:49pm--Lasteditedby--MBrownonAugust30,19821:24pmDIRECTORY10pb!6`w 4-I149^68Y &k(,&-/268z]#h2!#!(+.4 Y #D'/ /i3k<> X%6Z &gV{6*6"&)v S'  6Q}6 2O #3N* #XLJ6 I, "H.G*E6D. B6@ ?06M= ;6:286|j6 556 316s'd#w07.68,+96kY!#&()'60&;$ !>BoT* !N3,  +  % %)" D% "$(+$ %)X -!:$I v)eTVm$=Eq s= &  = !  VE$ q Q"$' .fE{  # *J+Rope:TYPEUSING[ROPE];CIFSFeedback:CEDARDEFINITIONS={Register:PROC[p:PROC[Rope.ROPE]_NIL];--CIFSwillcalltheregisteredprocedurewithaRopedescribingeach--filemanipulationactivityonaremoteserver.Registeringp~NILwill--stopsuchreporting.--Thestyleofuseis:passanon-emptyropeatthestartofanactivity,--passanemptyrope(e.g.NIL)attheendoftheactivity.}..--FileLookup.mesa--M.D.Schroeder,September7,198211:54amDIRECTORYRope:TYPEUSING[ROPE],System:TYPEUSING[GreenwichMeanTime];FileLookup:CEDARDEFINITIONS=BEGINResult:TYPE={noResponse,noSuchPort,noSuchName,ok};LookupFile:PROC[server,file:Rope.ROPE]RETURNS[result:Result,version:CARDINAL,create:System.GreenwichMeanTime,count:LONGCARDINAL];--ThisprocedureusestheLookupFilepacketexchangeprotocoltoobtainthe--versionnumber,createtime,andbytelengthofafileonaremotefileserver.--Thefilenamemaybespecifiedcompletewithversionnumber,with"!h",with"!l",--orwithnoversion.Thefilenamescanbespecifiedeitherwiththe"<..>..>.."syntax--orwiththe".../.../..."syntax(besurethatthenamedoesnotstartwitha'/).--Iftheresultis"ok"thentherequestedfileexistswiththereturned--versionnumber,createtime,andbytelength."noSuchName"meansthateither--theservernamewasnonsenseorthatthefiledoesnotexistonthatserver.--"noSuchPort"meansthattheserverrespondedwithano-such-porterrorpacket--whenproddedontheLookupFilesocket."noResponse"meansthateithertheNLS--didn'trespondtotheservernamelookup,theLookupFilepacketdidn'tgettothe--server,ortheserverdidnotrespondtoit.--LookupFilecachesthestateoftheserverasderivedfrompreviouslookupattempts.--Ifthecachedstateforaserveriseither"noResponse"or"noSuchPort"then--LookupFileimmediatelyreturnsthatresultwithoutattemptinganycommunication.--Suchnegativecacheentriesareflushedafterfiveminutes.Positivecacheentries--containthePupaddressoftheserver,eliminatingtheneedtodoaNLSlookup--ontheservername.--Thelongestthatyoushouldhavetowaitforaresponseis~4*(2+0.5*MIN[8,hopCount])--seconds.Thisisthetimeitwilltaketodecidedthataserverisn'tgoingtorespondinthe--caseofanuncacheddownserver.Mostanswersaredeterminedmuchmorequickly.11p b!L ^ 1 &8( [x" &:' Y-w 'E*`+/? 5 X$ zC I!s&*~ 1347 Vz T-6dIBl&g)+0-02X4I S&!##%(:),S O J% I*%VQ , !$( E D,L BU ?. ? $F&+ ;w = ( 0 8  (6,|$51C&+/ 1%? $(.4`6:S 03%qs"%)+,/>1D2n79 .%f&)!'*/5%8@;> ,% $2&(.j2W5q7 = +5%c  "j%d(2*.Q137:!;K '%= &_(,}/1 &7%qs"%* 49; $%P "%u'*>-n/357 "% ?  m$y+(.C/l 7: !9%_e #C(M 1Z58l %'jx#D(C* 2!6|:<>w %M.$& % S!=#')W.L17B; %1!="& /1f :< <%  {".$(- 47Z %C!&v),h2{7;g %cG1!I% ,/?24K6Q7{: >%+ %}4"$')+02368 @%1!w"#%&+./36:{h.PutF["%s\n",IO.rope[error]];CONTINUE;};IO.EndOfStream=>{h.PutChar['\n];CONTINUE;};};fh_CIFS.Open[name:argv[1],mode:CIFS.read];riS_FileIO.StreamFromOpenFile[openFile:fh];;DOIFUserExec.UserAbort[]THENEXIT;n_riS.GetBlock[buffer];h.PutBlock[buffer];IFn#256THENEXIT;12p at Z#p U % Sc%b P Nd LY* 1E; K Ie G F B Ap#( ?h <- :i= = 8 7p 3!$# 2 0lk .Gr-+mR7)g( 1&o$ # n!p nnq knns{"X& t~#*| I# u  !}v)e"TVm$LV F v V<N > cNENDLOOP;IFn>0ANDbuffer[n-1]#'\nTHENh.PutChar['\n];};UserExec.ResetUserAbort[];IFriS#NILTHENriS.Close[];IFfh#NILTHENCIFS.Close[fh];};--MainlineUserExec.RegisterCommand["Type.~",Type,"Typefile",typeC];}.13pb)`Z)!>%^]3[f YcX= SG- Q"%)-1a NQv)eTVm$T TIMESROMAN HELVETICA TIMESROMAN TIMESROMAN TIMESROMANLOGO TIMESROMAN TIMESROMANL   'Z-39@[E{M"PEQNLOGO TIMESROMAN TIMESROMANY TIMESROMANj/TRĔCifsManual.press 1-Oct-82 11:20:41