diff options
Diffstat (limited to 'src/main/kotlin/ProtocolTranslator.kt')
-rw-r--r-- | src/main/kotlin/ProtocolTranslator.kt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/kotlin/ProtocolTranslator.kt b/src/main/kotlin/ProtocolTranslator.kt index b74eef0..b3674f1 100644 --- a/src/main/kotlin/ProtocolTranslator.kt +++ b/src/main/kotlin/ProtocolTranslator.kt @@ -75,8 +75,16 @@ interface ProtocolTranslator { /** * Prepare an FID for I/O on an existing file. + * + * @param fid The FID of the file to open. + * @param mode The mode in which the file is opened. + * @return A pair of: (1) the returned QID, 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 open(path: String) + fun open(fid: UInt, mode: FileMode): Pair<QID, UInt> /** * Prepare an FID for I/O on a new file. |