diff options
Diffstat (limited to 'src/main/kotlin/ProtocolTranslator.kt')
-rw-r--r-- | src/main/kotlin/ProtocolTranslator.kt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main/kotlin/ProtocolTranslator.kt b/src/main/kotlin/ProtocolTranslator.kt index c023dd6..8623737 100644 --- a/src/main/kotlin/ProtocolTranslator.kt +++ b/src/main/kotlin/ProtocolTranslator.kt @@ -90,8 +90,19 @@ interface ProtocolTranslator { /** * Prepare an FID for I/O on a new file. + * + * @param fid The FID of the directory that is going to contain the file. The specified directory requires write + * permission. + * @param name The file name. + * @param perm The permissions of the new file. + * @param mode The open mode after successful creation. + * @return A pair of: (1) the QID of the newly created file, and (2) a value called `iounit` that indicates, if + * non-zero, the maximum number of bytes that are guaranteed to be read from or written to the file without breaking + * the I/O transfer into multiple 9P messages. + * @throws except.InvalidMessageException if the received message is invalid. + * @throws except.RErrorException if the received message is an R-error message. */ - fun create(path: String) + fun create(fid: UInt, name: String, perm: FilePermissions, mode: FileMode): Pair<QID, UInt> /** * Transfer data from file. Due to the negotiated maximum size of 9P messages, called `msize`, one is supposed to |