NFS version 3 and its mount protocol over the POSIX view of a store: nfsService(view, options) gives one function that takes a call of ONC RPC and gives the bytes of its reply, with nothing of a socket in it. A file handle is the boot identity of the server and a number the server gives a path (a bounded table, so a handle that is not known is NFS3ERR_STALE); the attributes of an object are those of its stat, with a time that changes with its revision where the store keeps none; a write is held in a buffer of the whole object and put as one object at COMMIT, at a write that asks for stable storage, when the buffer has been idle, before a rename and at the end; and what the store cannot keep (links, nodes, modes, owners, times) is refused, or accepted and counted where the person asked for that. The status of a failure is the table of nfsStatusOfErrno over the code the view gave, and every operation tells onEvent how it was carried out.
typeNfsEvent= {
readonlyproc:NfsProcedure|"MNT"|"UMNT"|"UMNTALL"|"EXPORT"|"DUMP";
readonlypath?:string;
readonlystatus:number;
readonlyfidelity:Fidelity;
/** The uid the call said it was, where it said one. */readonlyuid?:number;
/** What the operation noticed on the way (the mode of a create that is not kept, an attribute that was dropped). */readonlynote?:string;
};
What the service tells of one operation: the procedure, the path, the status given and how it was carried out.
type NfsOptions = {
/** The path a client mounts: `/` by default. */
readonly exportPath?: string;
/** Refuse ever…(1012 characters)
typeNfsOptions= {
/** The path a client mounts: `/` by default. */readonlyexportPath?:string;
/** Refuse every change. */readonlyreadOnly?:boolean;
/** The uids that may ask (the `AUTH_SYS` of the call); anyone where it is not given. */readonlyuids?:readonlynumber[];
/** What to do with a mode, an owner or a time the store cannot keep: refuse it (the default) or accept it without effect and count it. */readonlyattributes?:"refuse"|"ignore";
/** The largest object, in bytes: 64 MiB by default. */readonlymaxFileBytes?:number;
/** The most file handles held: 65536 by default. */readonlymaxHandles?:number;
/** How long a buffer is idle before it is put, in milliseconds: 2000 by default. */readonlyflushAfterMs?:number;
/** The time in milliseconds; the clock by default. */readonlyclock?: () =>number;
/** The identity of this boot, 8 bytes; random by default. */readonlyboot?:Uint8Array;
readonlyonEvent?: (event:NfsEvent) =>void;
};
type NfsService = {
/** Answers a call with the bytes of its reply. */
handle(call: RpcCall): Promise<Uint8Array>;
…(459 characters)
typeNfsService= {
/** Answers a call with the bytes of its reply. */handle(call:RpcCall):Promise<Uint8Array>;
/** Puts every buffer that holds a write; the failures are given. */flushAll():Promise<readonlystring[]>;
/** The identity of this boot: the write verifier and the first part of every handle. */readonlyboot:Uint8Array;
/** How many attributes were accepted without effect (`attributes: "ignore"`). */dropped():number;
};