···11+22+type dir
33+type file
44+55+type entry = {
66+ name: string;
77+ file: file;
88+}
99+1010+val root : dir
1111+val list : dir -> entry list
1212+1313+val create : dir -> string -> file
1414+val open_ : dir -> string -> file
1515+val delete : dir -> string -> unit
1616+1717+val size : file -> int64
1818+val read : file -> ?off:int64 -> ?len:int64 -> string
+34
mvp/bellairs.schema
···11+@0xa59e1c95e37fb55d;
22+33+interface Directory {
44+ # Represents a directory in the filesystem
55+66+ list @0 () -> (entries :List(Entry));
77+ # Lists all entries in the directory
88+99+ struct Entry {
1010+ name @0 :Text; # Name of the entry
1111+ file @1 :File; # Reference to the file object
1212+ }
1313+1414+ create @1 (name :Text) -> (file :File);
1515+ # Creates a new file with the given name
1616+1717+ open @2 (name :Text) -> (file :File);
1818+ # Opens an existing file with the given name
1919+2020+ delete @3 (name :Text);
2121+ # Deletes a file with the given name
2222+}
2323+2424+interface File {
2525+ # Represents a file in the filesystem
2626+2727+ size @0 () -> (size :UInt64);
2828+ # Returns the size of the file in bytes
2929+3030+ read @1 (off :UInt64 = 0, len :UInt64 = 0xffffffffffffffff) -> (data :Data);
3131+ # Reads data from the file, optionally starting at offset and reading up to len bytes
3232+ # Default is to read the entire file
3333+}
3434+