/* TODO: - add arguments to methods */ /** * The [NinePTranslator] interface provides methods that coincide 1:1 with each request and response type in the 9P * protocol, except for `Rerror` which is handled at occurrence. * * Trivia: comments for each method are taken from each message type's manual page in section 5. */ interface NinePTranslator { /** * Negotiate protocol version. */ fun version() /** * Perform authentication. */ fun auth() /** * Abort a message. */ fun flush() /** * Establish a connection. */ fun attach() /** * Descend a directory hierarchy. */ fun walk(path: String) /** * Prepare an FID for I/O on an existing file. */ fun open(path: String) /** * Prepare an FID for I/O on a new file. */ fun create(path: String) /** * Transfer data from file. */ fun read(path: String) /** * Transfer data to file. */ fun write(path: String) /** * Forget about an FID. */ fun clunk(path: String) /** * Remove a file from a server. */ fun remove(path: String) /** * Inquire file attributes. */ fun stat(path: String) /** * Change file attributes. */ fun wstat(path: String) }