Module OpamFile.SwitchSelectionsSource
A newer format for switch state, using the opam file syntax rather than a table. This is more readable and extensible.
include OpamFile.IO_FILE with type t := OpamFile.SwitchSelections.t
Empty file
Source
val write :
OpamFile.SwitchSelections.t OpamFile.typed_file ->
OpamFile.SwitchSelections.t ->
unitWrite some contents to a file
Read file contents.
Source
val read_opt :
OpamFile.SwitchSelections.t OpamFile.typed_file ->
OpamFile.SwitchSelections.t optionReturns None on non-existing file
Source
val safe_read :
OpamFile.SwitchSelections.t OpamFile.typed_file ->
OpamFile.SwitchSelections.tRead file contents. Return empty if the file does not exist.
Source
val read_from_channel :
?filename:OpamFile.SwitchSelections.t OpamFile.typed_file ->
Stdlib.in_channel ->
OpamFile.SwitchSelections.tSource
val read_from_string :
?filename:OpamFile.SwitchSelections.t OpamFile.typed_file ->
string ->
OpamFile.SwitchSelections.tSource
val write_to_channel :
?filename:OpamFile.SwitchSelections.t OpamFile.typed_file ->
Stdlib.out_channel ->
OpamFile.SwitchSelections.t ->
unitSource
val write_to_string :
?filename:OpamFile.SwitchSelections.t OpamFile.typed_file ->
OpamFile.SwitchSelections.t ->
string