Module Proto.Rstat

Rstat carries a Stat structure for the requested file.

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 stat : t -> Styx__.Types.Stat.t

The file's directory entry

val stat_buf : t -> Iovec.t

space to write the stat to.

val alloc : Iovec.ring -> t

alloc ring allocates space for the largest allowed stat structure, based on max_filename and max_username.

val commit : t -> tag:Tag.t -> len:int -> int