Module Proto.Tcreate

Tcreate requests a new file to be created with the given name and permissions. It requires write access to the parent directory.

type t
val size : t -> int

The size of this message in bytes. It is identical to the length of the underlying I/O vector but is also encoded in the first 4 bytes of the message.

val code : int

The op code for this message.

val tag : t -> Tag.t

An identifier for this transaction. All in-flight requests on a given connection must have unique tags.

val of_iovec : Iovec.t -> t

of_iovec verifies a message from an I/O vector. No copying is done, and of_iovec only performs bounds checks. Modifying the underlying I/O vector will change the results when accessing message fields.

val fid : t -> Fid.t

fid is a handle for the directory to create the file in. Write permission in this directory is required. Once the create is completed, fid will represent the newly created file, open for I/O according to flags.

val name : t -> Iovec.t

name is the name of the file to create.

val perm : t -> int

perm are the file permissions for the new file. The file server may modify these permissions at its discretion. On Plan 9, file permissions cannot exceed that of its parent directory's.

val flags : t -> Styx__.Types.Flag.t

the type of I/O for the newly opened file.

val ext : t -> Styx__.Types.Stat.extension option

9P2000.u: extensions for special files. See Types.Stat.extension.

val write : Iovec.t -> tag:Tag.t -> fid:Fid.t -> name:string -> perm:Styx__.Types.Mode.t -> flags:Styx__.Types.Flag.t -> int
val write_ext : Iovec.t -> tag:Tag.t -> fid:Fid.t -> name:string -> perm:Styx__.Types.Mode.t -> flags:Styx__.Types.Flag.t -> ext:Styx__.Types.Stat.extension -> int