Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emily file API - pattern? #27

Open
dckc opened this issue Apr 6, 2022 · 0 comments
Open

Emily file API - pattern? #27

dckc opened this issue Apr 6, 2022 · 0 comments

Comments

@dckc
Copy link
Owner

dckc commented Apr 6, 2022

Agoric/agoric-sdk#4987 (comment)

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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant