sig
type present = private [< `Phantom ]
type absent = private [> `Phantom ]
type +'a t
val raw : 'a Line.t -> string
val set_raw : string -> 'a Line.t -> 'a Line.t
val show : 'a Line.t -> string
val set_show : string -> 'a Line.t -> 'a Line.t
val select : ('a Line.t -> string) -> 'a Line.t -> 'a Line.t
type source =
[ `Command of string
| `Directory of string
| `File of string
| `None
| `Other of string
| `Process of Proc.execspec ]
val source : < source : Line.present; .. > Line.t -> Line.source
val set_source :
Line.source ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : 'f; ps : 'g; seq : 'h; source : 'i; stat : 'j >
Line.t ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : 'f; ps : 'g; seq : 'h; source : Line.present; stat : 'j >
Line.t
val seq : < seq : Line.present; .. > Line.t -> int
val set_seq :
int ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : 'f; ps : 'g; seq : 'h; source : 'i; stat : 'j >
Line.t ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : 'f; ps : 'g; seq : Line.present; source : 'i; stat : 'j >
Line.t
module Key_value :
sig
val key : < key_value : < .. >; .. > Line.t -> string
val set_key :
string -> (< key_value : < .. >; .. > as 'a) Line.t -> 'a Line.t
val value : < key_value : < .. >; .. > Line.t -> string
val set_value :
string -> (< key_value : < .. >; .. > as 'a) Line.t -> 'a Line.t
val as_int : < key_value : < .. >; .. > Line.t -> int option
val as_float : < key_value : < .. >; .. > Line.t -> float option
val as_bool : < key_value : < .. >; .. > Line.t -> bool option
val as_string :
?quoted:bool -> < key_value : < .. >; .. > Line.t -> string
val as_list :
?delim:char -> < key_value : < .. >; .. > Line.t -> string list
val section :
< key_value : < section : Line.present; .. >; .. > Line.t -> string
val set_section :
string ->
< delim : 'a; fstab : 'b; group : 'c; key_value : < section : 'd >;
mailcap : 'e; passwd : 'f; ps : 'g; seq : 'h; source : 'i;
stat : 'j >
Line.t ->
< delim : 'a; fstab : 'b; group : 'c;
key_value : < section : Line.present >; mailcap : 'e; passwd : 'f;
ps : 'g; seq : 'h; source : 'i; stat : 'j >
Line.t
val create :
key:string ->
value:string ->
< delim : 'a; fstab : 'b; group : 'c; key_value : Line.absent;
mailcap : 'd; passwd : 'e; ps : 'f; seq : 'g; source : 'h;
stat : 'i >
Line.t ->
< delim : 'a; fstab : 'b; group : 'c;
key_value : < section : Line.absent >; mailcap : 'd; passwd : 'e;
ps : 'f; seq : 'g; source : 'h; stat : 'i >
Line.t
end
module Delim :
sig
val fields : < delim : < .. >; .. > Line.t -> string array
val set_fields :
string array -> (< delim : < .. >; .. > as 'a) Line.t -> 'a Line.t
val names :
< delim : < names : Line.present; .. >; .. > Line.t -> string list
val set_names :
string list ->
< delim : < names : 'a; options : 'b >; fstab : 'c; group : 'd;
key_value : 'e; mailcap : 'f; passwd : 'g; ps : 'h; seq : 'i;
source : 'j; stat : 'k >
Line.t ->
< delim : < names : Line.present; options : 'b >; fstab : 'c;
group : 'd; key_value : 'e; mailcap : 'f; passwd : 'g; ps : 'h;
seq : 'i; source : 'j; stat : 'k >
Line.t
val get :
string ->
< delim : < names : Line.present; .. >; .. > Line.t -> string
val get_int :
string -> < delim : < names : Line.present; .. >; .. > Line.t -> int
val get_float :
string ->
< delim : < names : Line.present; .. >; .. > Line.t -> float
val options :
< delim : < options : Line.present; .. >; .. > Line.t ->
Delimited.options
val set_options :
Delimited.options ->
< delim : < names : 'a; options : 'b >; fstab : 'c; group : 'd;
key_value : 'e; mailcap : 'f; passwd : 'g; ps : 'h; seq : 'i;
source : 'j; stat : 'k >
Line.t ->
< delim : < names : 'a; options : Line.present >; fstab : 'c;
group : 'd; key_value : 'e; mailcap : 'f; passwd : 'g; ps : 'h;
seq : 'i; source : 'j; stat : 'k >
Line.t
val output :
Pervasives.out_channel ->
< delim : < options : Line.present; .. >; .. > Line.t -> unit
val create :
fields:string array ->
< delim : Line.absent; fstab : 'a; group : 'b; key_value : 'c;
mailcap : 'd; passwd : 'e; ps : 'f; seq : 'g; source : 'h;
stat : 'i >
Line.t ->
< delim : < names : Line.absent; options : Line.absent >; fstab : 'a;
group : 'b; key_value : 'c; mailcap : 'd; passwd : 'e; ps : 'f;
seq : 'g; source : 'h; stat : 'i >
Line.t
end
module Passwd :
sig
val name : < passwd : Line.present; .. > Line.t -> string
val set_name :
string -> (< passwd : Line.present; .. > as 'a) Line.t -> 'a Line.t
val passwd : < passwd : Line.present; .. > Line.t -> string
val set_passwd :
string -> (< passwd : Line.present; .. > as 'a) Line.t -> 'a Line.t
val uid : < passwd : Line.present; .. > Line.t -> int
val set_uid :
int -> (< passwd : Line.present; .. > as 'a) Line.t -> 'a Line.t
val gid : < passwd : Line.present; .. > Line.t -> int
val set_gid :
int -> (< passwd : Line.present; .. > as 'a) Line.t -> 'a Line.t
val gecos : < passwd : Line.present; .. > Line.t -> string
val set_gecos :
string -> (< passwd : Line.present; .. > as 'a) Line.t -> 'a Line.t
val home : < passwd : Line.present; .. > Line.t -> string
val set_home :
string -> (< passwd : Line.present; .. > as 'a) Line.t -> 'a Line.t
val shell : < passwd : Line.present; .. > Line.t -> string
val set_shell :
string -> (< passwd : Line.present; .. > as 'a) Line.t -> 'a Line.t
val create :
name:string ->
passwd:string ->
uid:int ->
gid:int ->
gecos:string ->
home:string ->
shell:string ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : Line.absent; ps : 'f; seq : 'g; source : 'h; stat : 'i >
Line.t ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : Line.present; ps : 'f; seq : 'g; source : 'h; stat : 'i >
Line.t
end
module Group :
sig
val name : < group : Line.present; .. > Line.t -> string
val set_name :
string -> (< group : Line.present; .. > as 'a) Line.t -> 'a Line.t
val passwd : < group : Line.present; .. > Line.t -> string
val set_passwd :
string -> (< group : Line.present; .. > as 'a) Line.t -> 'a Line.t
val gid : < group : Line.present; .. > Line.t -> int
val set_gid :
int -> (< group : Line.present; .. > as 'a) Line.t -> 'a Line.t
val users : < group : Line.present; .. > Line.t -> string list
val set_users :
string list ->
(< group : Line.present; .. > as 'a) Line.t -> 'a Line.t
val create :
name:string ->
passwd:string ->
gid:int ->
users:string list ->
< delim : 'a; fstab : 'b; group : Line.absent; key_value : 'c;
mailcap : 'd; passwd : 'e; ps : 'f; seq : 'g; source : 'h;
stat : 'i >
Line.t ->
< delim : 'a; fstab : 'b; group : Line.present; key_value : 'c;
mailcap : 'd; passwd : 'e; ps : 'f; seq : 'g; source : 'h;
stat : 'i >
Line.t
end
module Stat :
sig
val dev : < stat : < .. >; .. > Line.t -> int
val set_dev : int -> (< stat : < .. >; .. > as 'a) Line.t -> 'a Line.t
val inode : < stat : < .. >; .. > Line.t -> int
val set_inode :
int -> (< stat : < .. >; .. > as 'a) Line.t -> 'a Line.t
val kind : < stat : < .. >; .. > Line.t -> Unix.file_kind
val set_kind :
Unix.file_kind -> (< stat : < .. >; .. > as 'a) Line.t -> 'a Line.t
module Mode :
sig
val xusr :
< stat : < mode : Line.present; .. >; .. > Line.t -> bool
val set_xusr :
bool ->
(< stat : < mode : Line.present; .. >; .. > as 'a) Line.t ->
'a Line.t
val wusr :
< stat : < mode : Line.present; .. >; .. > Line.t -> bool
val set_wusr :
bool ->
(< stat : < mode : Line.present; .. >; .. > as 'a) Line.t ->
'a Line.t
val rusr :
< stat : < mode : Line.present; .. >; .. > Line.t -> bool
val set_rusr :
bool ->
(< stat : < mode : Line.present; .. >; .. > as 'a) Line.t ->
'a Line.t
val xgrp :
< stat : < mode : Line.present; .. >; .. > Line.t -> bool
val set_xgrp :
bool ->
(< stat : < mode : Line.present; .. >; .. > as 'a) Line.t ->
'a Line.t
val wgrp :
< stat : < mode : Line.present; .. >; .. > Line.t -> bool
val set_wgrp :
bool ->
(< stat : < mode : Line.present; .. >; .. > as 'a) Line.t ->
'a Line.t
val rgrp :
< stat : < mode : Line.present; .. >; .. > Line.t -> bool
val set_rgrp :
bool ->
(< stat : < mode : Line.present; .. >; .. > as 'a) Line.t ->
'a Line.t
val xoth :
< stat : < mode : Line.present; .. >; .. > Line.t -> bool
val set_xoth :
bool ->
(< stat : < mode : Line.present; .. >; .. > as 'a) Line.t ->
'a Line.t
val woth :
< stat : < mode : Line.present; .. >; .. > Line.t -> bool
val set_woth :
bool ->
(< stat : < mode : Line.present; .. >; .. > as 'a) Line.t ->
'a Line.t
val roth :
< stat : < mode : Line.present; .. >; .. > Line.t -> bool
val set_roth :
bool ->
(< stat : < mode : Line.present; .. >; .. > as 'a) Line.t ->
'a Line.t
val suid :
< stat : < mode : Line.present; .. >; .. > Line.t -> bool
val set_suid :
bool ->
(< stat : < mode : Line.present; .. >; .. > as 'a) Line.t ->
'a Line.t
val sgid :
< stat : < mode : Line.present; .. >; .. > Line.t -> bool
val set_sgid :
bool ->
(< stat : < mode : Line.present; .. >; .. > as 'a) Line.t ->
'a Line.t
val sticky :
< stat : < mode : Line.present; .. >; .. > Line.t -> bool
val set_sticky :
bool ->
(< stat : < mode : Line.present; .. >; .. > as 'a) Line.t ->
'a Line.t
val bits : < stat : < mode : Line.present; .. >; .. > Line.t -> int
val set_bits :
int ->
(< stat : < mode : Line.present; .. >; .. > as 'a) Line.t ->
'a Line.t
val create :
xusr:bool ->
wusr:bool ->
rusr:bool ->
xgrp:bool ->
wgrp:bool ->
rgrp:bool ->
xoth:bool ->
woth:bool ->
roth:bool ->
suid:bool ->
sgid:bool ->
sticky:bool ->
bits:int ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd;
mailcap : 'e; passwd : 'f; ps : 'g; seq : 'h; source : 'i;
stat : < blksize : 'j; blocks : 'k; mode : Line.absent > >
Line.t ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd;
mailcap : 'e; passwd : 'f; ps : 'g; seq : 'h; source : 'i;
stat : < blksize : 'j; blocks : 'k; mode : Line.present > >
Line.t
end
val nlink : < stat : < .. >; .. > Line.t -> int
val set_nlink :
int -> (< stat : < .. >; .. > as 'a) Line.t -> 'a Line.t
val uid : < stat : < .. >; .. > Line.t -> int
val set_uid : int -> (< stat : < .. >; .. > as 'a) Line.t -> 'a Line.t
val gid : < stat : < .. >; .. > Line.t -> int
val set_gid : int -> (< stat : < .. >; .. > as 'a) Line.t -> 'a Line.t
val rdev : < stat : < .. >; .. > Line.t -> int
val set_rdev : int -> (< stat : < .. >; .. > as 'a) Line.t -> 'a Line.t
val size : < stat : < .. >; .. > Line.t -> int
val set_size : int -> (< stat : < .. >; .. > as 'a) Line.t -> 'a Line.t
val blksize :
< stat : < blksize : Line.present; .. >; .. > Line.t -> int
val set_blksize :
int ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : 'f; ps : 'g; seq : 'h; source : 'i;
stat : < blksize : 'j; blocks : 'k; mode : 'l > >
Line.t ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : 'f; ps : 'g; seq : 'h; source : 'i;
stat : < blksize : Line.present; blocks : 'k; mode : 'l > >
Line.t
val blocks : < stat : < blocks : Line.present; .. >; .. > Line.t -> int
val set_blocks :
int ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : 'f; ps : 'g; seq : 'h; source : 'i;
stat : < blksize : 'j; blocks : 'k; mode : 'l > >
Line.t ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : 'f; ps : 'g; seq : 'h; source : 'i;
stat : < blksize : 'j; blocks : Line.present; mode : 'l > >
Line.t
val atime : < stat : < .. >; .. > Line.t -> float
val set_atime :
float -> (< stat : < .. >; .. > as 'a) Line.t -> 'a Line.t
val mtime : < stat : < .. >; .. > Line.t -> float
val set_mtime :
float -> (< stat : < .. >; .. > as 'a) Line.t -> 'a Line.t
val ctime : < stat : < .. >; .. > Line.t -> float
val set_ctime :
float -> (< stat : < .. >; .. > as 'a) Line.t -> 'a Line.t
val create :
dev:int ->
inode:int ->
kind:Unix.file_kind ->
nlink:int ->
uid:int ->
gid:int ->
rdev:int ->
size:int ->
atime:float ->
mtime:float ->
ctime:float ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : 'f; ps : 'g; seq : 'h; source : 'i; stat : Line.absent >
Line.t ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : 'f; ps : 'g; seq : 'h; source : 'i;
stat : < blksize : Line.absent; blocks : Line.absent;
mode : Line.absent > >
Line.t
end
module Ps :
sig
val user : < ps : Line.present; .. > Line.t -> string
val set_user :
string -> (< ps : Line.present; .. > as 'a) Line.t -> 'a Line.t
val pid : < ps : Line.present; .. > Line.t -> int
val set_pid :
int -> (< ps : Line.present; .. > as 'a) Line.t -> 'a Line.t
val pcpu : < ps : Line.present; .. > Line.t -> float
val set_pcpu :
float -> (< ps : Line.present; .. > as 'a) Line.t -> 'a Line.t
val pmem : < ps : Line.present; .. > Line.t -> float
val set_pmem :
float -> (< ps : Line.present; .. > as 'a) Line.t -> 'a Line.t
val vsz : < ps : Line.present; .. > Line.t -> int
val set_vsz :
int -> (< ps : Line.present; .. > as 'a) Line.t -> 'a Line.t
val rss : < ps : Line.present; .. > Line.t -> int
val set_rss :
int -> (< ps : Line.present; .. > as 'a) Line.t -> 'a Line.t
val tt : < ps : Line.present; .. > Line.t -> string
val set_tt :
string -> (< ps : Line.present; .. > as 'a) Line.t -> 'a Line.t
val stat : < ps : Line.present; .. > Line.t -> string
val set_stat :
string -> (< ps : Line.present; .. > as 'a) Line.t -> 'a Line.t
val started : < ps : Line.present; .. > Line.t -> string
val set_started :
string -> (< ps : Line.present; .. > as 'a) Line.t -> 'a Line.t
val time : < ps : Line.present; .. > Line.t -> string
val set_time :
string -> (< ps : Line.present; .. > as 'a) Line.t -> 'a Line.t
val command : < ps : Line.present; .. > Line.t -> string
val set_command :
string -> (< ps : Line.present; .. > as 'a) Line.t -> 'a Line.t
val create :
user:string ->
pid:int ->
pcpu:float ->
pmem:float ->
vsz:int ->
rss:int ->
tt:string ->
stat:string ->
started:string ->
time:string ->
command:string ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : 'f; ps : Line.absent; seq : 'g; source : 'h; stat : 'i >
Line.t ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd; mailcap : 'e;
passwd : 'f; ps : Line.present; seq : 'g; source : 'h; stat : 'i >
Line.t
end
module Fstab :
sig
val file_system : < fstab : Line.present; .. > Line.t -> string
val set_file_system :
string -> (< fstab : Line.present; .. > as 'a) Line.t -> 'a Line.t
val mount_point : < fstab : Line.present; .. > Line.t -> string
val set_mount_point :
string -> (< fstab : Line.present; .. > as 'a) Line.t -> 'a Line.t
val fstype : < fstab : Line.present; .. > Line.t -> string
val set_fstype :
string -> (< fstab : Line.present; .. > as 'a) Line.t -> 'a Line.t
val options : < fstab : Line.present; .. > Line.t -> string list
val set_options :
string list ->
(< fstab : Line.present; .. > as 'a) Line.t -> 'a Line.t
val dump : < fstab : Line.present; .. > Line.t -> int
val set_dump :
int -> (< fstab : Line.present; .. > as 'a) Line.t -> 'a Line.t
val pass : < fstab : Line.present; .. > Line.t -> int
val set_pass :
int -> (< fstab : Line.present; .. > as 'a) Line.t -> 'a Line.t
val create :
file_system:string ->
mount_point:string ->
fstype:string ->
options:string list ->
dump:int ->
pass:int ->
< delim : 'a; fstab : Line.absent; group : 'b; key_value : 'c;
mailcap : 'd; passwd : 'e; ps : 'f; seq : 'g; source : 'h;
stat : 'i >
Line.t ->
< delim : 'a; fstab : Line.present; group : 'b; key_value : 'c;
mailcap : 'd; passwd : 'e; ps : 'f; seq : 'g; source : 'h;
stat : 'i >
Line.t
end
module Mailcap :
sig
val content_type : < mailcap : Line.present; .. > Line.t -> string
val set_content_type :
string -> (< mailcap : Line.present; .. > as 'a) Line.t -> 'a Line.t
val command : < mailcap : Line.present; .. > Line.t -> string
val set_command :
string -> (< mailcap : Line.present; .. > as 'a) Line.t -> 'a Line.t
val flags : < mailcap : Line.present; .. > Line.t -> string list
val set_flags :
string list ->
(< mailcap : Line.present; .. > as 'a) Line.t -> 'a Line.t
val fields :
< mailcap : Line.present; .. > Line.t -> (string * string) list
val set_fields :
(string * string) list ->
(< mailcap : Line.present; .. > as 'a) Line.t -> 'a Line.t
val create :
content_type:string ->
command:string ->
flags:string list ->
fields:(string * string) list ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd;
mailcap : Line.absent; passwd : 'e; ps : 'f; seq : 'g; source : 'h;
stat : 'i >
Line.t ->
< delim : 'a; fstab : 'b; group : 'c; key_value : 'd;
mailcap : Line.present; passwd : 'e; ps : 'f; seq : 'g;
source : 'h; stat : 'i >
Line.t
end
val after : 'a Line.t -> string
val set_after : string -> 'a Line.t -> 'a Line.t
val before : 'a Line.t -> string
val set_before : string -> 'a Line.t -> 'a Line.t
type empty =
< delim : Line.absent; fstab : Line.absent; group : Line.absent;
key_value : Line.absent; mailcap : Line.absent; passwd : Line.absent;
ps : Line.absent; seq : Line.absent; source : Line.absent;
stat : Line.absent >
val line : ?after:string -> ?before:string -> string -> Line.empty Line.t
end