package stdune

  1. Overview
  2. Docs
Dune's unstable standard library

Install

Dune Dependency

Authors

Maintainers

Sources

dune-3.7.0.tbz
sha256=e2d637c9d080318fedf5e71d2a29fb367624f82ac4a26e83df2b3a03550528b8
sha512=586e47ee45cd53a8c13095bde0b47de99aad9462d0a52199362140b5b654ca862597fa9f27f729a8cc594684ac46858848f9fa76f8f06dc8dc8ab8b1186a3295

doc/stdune/Stdune/Io/index.html

Module Stdune.IoSource

IO operations.

Sourceval close_in : in_channel -> unit
Sourceval close_out : out_channel -> unit
Sourceval close_both : (in_channel * out_channel) -> unit
Sourceval input_lines : in_channel -> string list
Sourceval copy_channels : in_channel -> out_channel -> unit

This function is not safe to use from multiple threads, even if operating on unrelated channels because it uses a statically-allocated global buffer.

Sourceval read_all : in_channel -> string
Sourcetype path = Path.t
Sourceval open_in : ?binary:bool -> path -> in_channel
Sourceval open_out : ?binary:bool -> ?perm:int -> path -> out_channel
Sourceval with_file_in : ?binary:bool -> path -> f:(in_channel -> 'a) -> 'a
Sourceval with_file_out : ?binary:bool -> ?perm:int -> path -> f:(out_channel -> 'a) -> 'a
Sourceval with_lexbuf_from_file : path -> f:(Lexing.lexbuf -> 'a) -> 'a
Sourceval lines_of_file : path -> string list
Sourceval zero_strings_of_file : path -> string list

Reads zero-separated strings from a file

Sourceval read_file : ?binary:bool -> path -> string
Sourceval write_file : ?binary:bool -> ?perm:int -> path -> string -> unit
Sourceval compare_files : path -> path -> Ordering.t
Sourceval compare_text_files : path -> path -> Ordering.t
Sourceval write_lines : ?binary:bool -> ?perm:int -> path -> string list -> unit
Sourceval copy_file : ?chmod:(int -> int) -> src:path -> dst:path -> unit -> unit
Sourceval setup_copy : ?chmod:(int -> int) -> src:path -> dst:path -> unit -> in_channel * out_channel
Sourceval file_line : path -> int -> string
Sourceval file_lines : path -> start:int -> stop:int -> (string * string) list
Sourceval cat : ?binary:bool -> ?dst:out_channel -> path -> unit

reads a file and prints its contents to stdout or the specified channel

Sourcemodule String_path : sig ... end

Symlink with fallback to copy on systems that don't support it.

Hardlink with fallback to copy on systems that don't support it.

OCaml

Innovation. Community. Security.