1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-09-29 15:10:58 +10:00
OC-Minitel/MTFS
2020-10-14 17:20:12 +11:00
..
OpenOS/usr fix cached file type, and cache whether the filesystem is read only 2020-10-14 17:20:12 +11:00
README.md added a basic outline of the MTFS protocol 2020-10-12 19:36:08 +11:00

MTFS

MTFS is, in effect, a standardised set of names for function endpoints implementing the API of an OpenComputers filesystem component, over Minitel RPC.

Function names

Names for filesystem "component" functions should follow the form fs_<identifier>_<function>, so, for example, fs_/usr_isDirectory.

Functions

Unless otherwise specified, functions should be inherited from, or implemented to emulate, an OpenComputers filesystem component. 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},
 ...
}