package stdune

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

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.

Sourceval set_copy_impl : [ `Portable | `Best ] -> unit
OCaml

Innovation. Community. Security.