Skip to content

Commit

Permalink
[ci skip] Add interface for {In,Out}_channel
Browse files Browse the repository at this point in the history
  • Loading branch information
nojb committed Jul 29, 2021
1 parent 9c67b25 commit 5633260
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
35 changes: 35 additions & 0 deletions stdlib/in_channel.mli
@@ -0,0 +1,35 @@
type t = in_channel

val stdin : t

val create : string -> t

val create_bin : string -> t

val create_gen : open_flag list -> t

val seek : t -> int64 -> unit

val pos : t -> int64

val length : t -> int64

val close : t -> unit

val close_noerr : t -> unit

val input_byte : t -> int option

val input_char : t -> char option

val input_line : t -> string option

val input_binary_int : t -> int option

val input : t -> bytes -> int -> int -> int

val really_input : t -> bytes -> int -> int -> unit option

val really_input_string : t -> int -> string option

val set_binary_mode : t -> bool -> unit
41 changes: 41 additions & 0 deletions stdlib/out_channel.mli
@@ -0,0 +1,41 @@
type t = out_channel

val stdout : t

val stderr : t

val create : string -> t

val create_bin : string -> t

val create_gen : open_flag list -> string -> t

val seek : t -> int64 -> unit

val pos : t -> int64

val length : t -> int64

val close : t -> unit

val close_noerr : t -> unit

val flush : t -> unit

val flush_all : unit -> unit

val output_byte : t -> int -> unit

val output_char : t -> char -> unit

val output_string : t -> string -> unit

val output_bytes : t -> bytes -> unit

val output : t -> bytes -> int -> int -> unit

val output_substring : t -> string -> int -> int -> unit

val output_binary_int : t -> int -> unit

val set_binary_mode : t -> bool -> unit

0 comments on commit 5633260

Please sign in to comment.