A separate lookupAdmin method? hm. This structure reminds me of the Emily file API (which I have ported to python umpteen times, none of which is handy just now).
Ah... actually, it had subEdFiles and subRdFiles just like we have lookup and lookupAdmin here. Fair enough.
type readable = {
isDir : unit -> bool;
exists : unit -> bool;
subRdFiles : unit -> readable list;
subRdFile : string -> readable;
inChannel : unit -> in_channel;
getBytes : unit -> string;
fullPath : unit -> string;
}
type editable = {
ro : readable;
subEdFiles : unit -> editable list;
subEdFile : string -> editable;
outChannel : unit -> out_channel;
setBytes : string -> unit;
mkDir : unit -> unit;
createNewFile : unit -> unit;
delete : unit -> unit;
}
https://github.com/Agoric/agoric-sdk/pull/4987#discussion_r841111422