From d0933c9967dd219dec737fad7ae177d7cd27c617 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Mon, 12 Oct 2020 19:36:08 +1100 Subject: [PATCH] added a basic outline of the MTFS protocol --- MTFS/README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 MTFS/README.md diff --git a/MTFS/README.md b/MTFS/README.md new file mode 100644 index 0000000..f085e98 --- /dev/null +++ b/MTFS/README.md @@ -0,0 +1,44 @@ +# MTFS + +MTFS is, in effect, a standardised set of names for function endpoints implementing the [API of an OpenComputers filesystem component](https://ocdoc.cil.li/component:filesystem), over Minitel RPC. + +## Function names + +Names for filesystem "component" functions should follow the form `fs__`, so, for example, `fs_/usr_isDirectory`. + +## Functions + +Unless otherwise specified, functions should be inherited from, or implemented to emulate, an [OpenComputers filesystem component](https://ocdoc.cil.li/component:filesystem). More specifically: + +- spaceUsed +- seek +- makeDirectory +- exists +- isReadOnly +- write +- spaceTotal +- isDirectory +- rename +- list +- lastModified +- getLabel +- setLabel +- remove +- size +- open +- read +- write +- close + +### Optional extensions + +#### dirstat + +An optional extra function, `dirstat`, may be implemented on the server side to allow clients to access directory listings with less RPC calls; it should return data in a Lua table of the following structure: + +``` +{ + [filename: string] = {isDirectory: boolean, size: boolean, lastModified: number}, + ... +} +```