GuestProcsRec:
TYPE =
RECORD [
IsGuestProcess: PROC [] RETURNS [isGuest: BOOL],
SetDefaultWDir: PROC [dir: ROPE ← NIL],
GetDefaultWDir: PROC RETURNS [ROPE],
ExpandName: PROC[name: ROPE, wDir: ROPE ] RETURNS [useDefault: BOOL, fullFName: ROPE, cp: FS.ComponentPositions, dirOmitted: BOOLEAN],
FileInfo: PROC [name: ROPE, wantedCreatedTime: BasicTime.GMT, remoteCheck: BOOLEAN, wDir: ROPE] RETURNS [fullFName, attachedTo: ROPE, keep: CARDINAL, bytes: INT, created: BasicTime.GMT],
EnumerateForInfo: PROC [pattern: ROPE, proc: FS.InfoProc, wDir: ROPE],
EnumerateForNames: PROC [pattern: ROPE, proc: NameProc, wDir: ROPE],
Open: PROC [name: ROPE, lock: FS.Lock, wantedCreatedTime: BasicTime.GMT, remoteCheck: BOOLEAN, wDir: ROPE] RETURNS [FS.OpenFile],
Create: PROC [name: ROPE, setPages: BOOLEAN, pages: INT, setKeep: BOOLEAN, keep: CARDINAL, wDir: ROPE] RETURNS [FS.OpenFile],
Copy: PROC [from, to: ROPE, setKeep: BOOLEAN, keep: CARDINAL, wantedCreatedTime: BasicTime.GMT, remoteCheck: BOOLEAN, attach: BOOLEAN, wDir: ROPE] RETURNS [toFName: ROPE],
Delete: PROC [name: ROPE, wantedCreatedTime: BasicTime.GMT, wDir: ROPE],
Rename: PROC [from, to: ROPE, setKeep: BOOLEAN, keep: CARDINAL, wantedCreatedTime: BasicTime.GMT, wDir: ROPE],
SetKeep: PROC [name: ROPE, keep: CARDINAL, wDir: ROPE]
];
RegisterGuestProcs:
PROC [newProcs:
REF GuestProcsRec];
Register procedures to determine if a process is a guest, and procedures to handle SetDefaultWDir, GetDefaultWDir, ExpandName, FileInfo, EnumerateForInfo, EnumerateForNames, Open, Create, OpenOrCreate, Copy, Delete, Rename, and SetKeep for guests.