XNSRemoteFileDoc.tioga
Copyright Ó 1990, 1992 by Xerox Corporation. All rights reserved.
Willie-s, December 17, 1992 11:30 am PST
Weiser, March 31, 1991 6:16 pm PST
XNSRemoteFile
CEDAR 10.1 %
XNSRemoteFile
PFS Access to XNS Filing Services
Willie Sue Orr
Ó Copyright 1990, 1992 Xerox Corporation. All rights reserved.
Abstract: XNSRemoteFile is an implementation of routines for use by PFS in order to gain access XNS filing services. XNS filing provides some services not available on other servers.
Created by: Willie Sue Orr (derived from the Cedar7.0 RemoteFile implementation)
Maintained by: Willie Sue Orr <Willie Sue Orr:PARC>
Keywords: XNS Filing, Courier RPC, PFS, ...
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
    Palo Alto, California 94304

1. XNSRemoteFile
Using XNSRemoteFile
Warning: if you have not done an xnslogin and try to access an xns file server, you will get an uncaught signal; this is a problem with PFS, which should be catching the PFSClass.Error and turning it into a PFS.Error. This will get fixed soon.
Accessing XNS file Servers:
You need to define prefix map entries for the servers you want to access:
% pma /FS8 FS8:Parc-XNS:/
% pma /RomeCedarCommon Rome:Parc-XNS:/CedarCommon2.0
% pma /RCC Rome:Parc-XNS:/CedarCommon2.0
% pma /snert "Snert:OSBU North-XNS:/" (note " marks)
At some point you type:
% XNSRemoteFile
Then you can do:
% ls /RCC/FamousFiles/Gargoyle*
/RCC/FamousFiles/
Gargoyle.icons!1 11264 25-Jan-88 16:53:22 PST
Gargoyle.tip!3 16425 27-Aug-90 18:45:32 PDT
GargoyleDoc.tioga!1 151793 07-Nov-89 22:23:06 PST
-- 3 files, 179482 total bytes
XNS Filing under Unix ("Hawaii" implementation)
As of Dec, 1992, the Hawaii implementation of XNS Filing does not support filtering of pathnames; this means that one cannot enumerate the entire tree; one can only do this one level at a time. Filtering of file names is supported.
One cannot cd to a directory on one of these servers (this problem is being investigated).
The other operations, like copy, open, etc., work as expected.
% pma /xnscedartest Kahio:Parc-XNS:/CedarTest
% ls /xnscedartest/
/XNSCedarTest/
.cedar.profile!1 13100 11-Mar-92 18:49:10 PST
/XNSCedarTest/xcc/
!1 0 12-Mar-92 13:19:58 PST
-- 2 files, 13100 total bytes
% ls /XNSCedarTest/xcc/*
/XNSCedarTest/xcc/
MyStdCorpse5.c2c.c!1 9750 11-Mar-92 11:33:26 PST
MyStdCorpse5.mesa!1 1729 11-Mar-92 11:33:17 PST
MyStdCorpse5.mob!1 16044 11-Mar-92 11:33:25 PST
XNSCH.mob!1 19492 11-Mar-92 11:22:34 PST
XNSCHName.mob!1 6808 10-Mar-92 17:10:48 PST
XNSCredentials.mob!1 6652 27-Mar-92 17:12:35 PST
-- 6 files, 60475 total bytes
% ls /XNSCedarTest/xcc/*.mesa
/XNSCedarTest/
MyStdCorpse5.mesa!1 1729 11-Mar-92 11:33:17 PST
-- 1 files, 1729 total bytes
Options available on XNS file servers (but not on NFS servers)
XNS file servers have the notion of file types. In keeping with the DCedar implmentation, I have provided a command called ChangeFileType (which uses the PFSClass.SetAttributes call, but only uses the fileType part of the record and only does the call only if the file is on an XNS server). ChangeFileType takes the name of the file as its first argument; the second argument, the new file type, can be one of { tUnspecified tDirectory tText }, or it can be a number. No checking is done.
% ChangeFileType fileName { tUnspecified tDirectory tText } | fileName newType(as number)
There is also a command PrintFileType, which prints the file type as a number suitable for use in ChangeFileType.
% PrintFileType fileName
Of interest to readers of XNS mail is Deserialize, which allows one to store a retrieved xnsMail attachment (a serialized file on the local machine) to an xns File Server; then ViewPoint can make sense of the file on the server (a vpDocument), or a directory subtree will appear on the server (vpFolder), etc. The command has two forms
% Deserialize xns-file-server-directory-name ← serialized-fileName
% Deserialize serialized-fileName
In the second case, the profile option XNSMail.DeserializeDir names the destination directory.
XNS File Types
The following types were collected by Tim Diebert from the product folks on August 29, 1988. This is not an exhaustive list. By independent verification, they seem to work on both GV and VP. The text format become a VP simple document, suitable for opening and editing in VP and GV.
0  (Unspecified)
1  (Directory, Folder)
2  (Text)
3  (Serialized)
4  (Empty,MailNote)
4098 (FileDrawer)
4101 (Binary)
4226 (BravoText)
4290 (Print Service Fonts)
4352 (Desktop)
4353 (Star Document)
4355 (Inbasket)
4360 (Outbasket)
4361 (Interpress)
4365 (Record File)
4379 (Reference)