Types.FileMode
val sexp_of_permission : permission -> Ppx_sexp_conv_lib.Sexp.t
val permission_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> permission
val __permission_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> permission
type t = {
owner : permission list; | (* file owner has these permissions *) |
group : permission list; | (* anyone in the same group has these permissions *) |
other : permission list; | (* all other users have these permissions *) |
is_directory : bool; | (* true if the file is a directory *) |
append_only : bool; | (* true if the file is append-only (and therefore offsets in writes are ignored) *) |
exclusive : bool; | (* true if only one client may have it open at a time *) |
is_mount : bool; | (* true if the file is a mountpoint *) |
is_auth : bool; | (* true if the file is a special authentication file *) |
temporary : bool; | (* true if the file is temporary and should be skipped from nightly backups *) |
is_device : bool; | (* 9P2000.u: true if file is a char/block device *) |
is_symlink : bool; | (* 9P2000.u: true if file is a symlink *) |
is_hardlink : bool; | (* 9P2000.u?: true if file should be a hardlink *) |
is_namedpipe : bool; | (* 9P2000.u: true if file is a nomed pipe *) |
is_socket : bool; | (* 9P2000.u: true if file is a socket *) |
is_setuid : bool; | (* 9P2000.u: true if file is setuid *) |
is_setgid : bool; | (* 9P2000.u: true if file is setgid *) |
is_any : bool; | (* true if the mode is a wstat 'any' value *) |
}
A 'mode' returned from a call to "Stat"
val make : ?owner:permission list -> ?group:permission list -> ?other:permission list -> ?is_directory:bool ->
?append_only:bool -> ?exclusive:bool -> ?is_mount:bool -> ?is_auth:bool ->
?temporary:bool -> ?is_device:bool -> ?is_symlink:bool -> ?is_hardlink:bool ->
?is_namedpipe:bool -> ?is_socket:bool -> ?is_setuid:bool -> ?is_setgid:bool -> unit -> t
val any : t
val is_any : t -> bool
val nonet_of_permissions : t -> int32
val sizeof : t -> int
The size of a buffer needed to hold t
val read : Cstruct.t -> (t * Cstruct.t, [ `Msg of string ]) Stdlib.result
Read a t
from the given buffer and return it, along with the unused remainder of the buffer. If the buffer cannot be parsed then return an error.
val write : t -> Cstruct.t -> (Cstruct.t, [ `Msg of string ]) Stdlib.result
Write a t
into the given buffer. If the buffer is too small, then return an error. Return the unused remainder of the buffer.