A pseudo-abstraction over binary and textual input channels.
OCaml-compatible channels conflate binary and text IO, and for this reasons their
use from F# is somewhat deprecated (direct use of System.IO StreamReader, TextReader and
BinaryReader objects is preferred, e.g. see System.IO.File.OpenText).
Well-written OCaml-compatible code that simply opens either a channel in text or binary
mode and then does text or binary I/O using the OCaml-compatible functions below
will work, though care must be taken with regard to end-of-line characters (see
input_char below).
This library pretends that an in_channel is just a System.IO.TextReader. Channel values
created using open_in_bin maintain a private System.IO.BinaryReader, which will be used whenever
you do I/O using this channel.
InChannel.of_BinaryReader and InChannel.of_StreamReader allow you to build input
channels out of the corresponding .NET abstractions.
Note: an abbreviation for TextReader
Full Type Signature
[<OCamlCompatibilityAttribute
("Consider using one of the types System.IO.TextReader, System.IO.BinaryReader or System.IO.StreamReader instead")>]
type in_channel = TextReader
|