Module Channel.Dup


module Dup: sig .. end
Convenience operators for specifying shell-style dups.

This module provides one prefix operator and a surfeit of infix operators. The prefix operator Channel.Dup.(!%) reveals the integer value of an abstract UNIX file descriptor. The infix operators are for specifying dups, as follows:

Some example dups:

type dup_arg = Channel.dup_source * Channel.gen_channel 
Generalized channels and file descriptor manipulation.
val (!%) : Channel.descr -> int
Get the integer value of an abstract file descriptor.
val ( *<& ) : Channel.gen_in_channel -> Channel.dup_in_source -> dup_arg
Dup a Channel.dup_in_source onto a Channel.gen_in_channel.
val ( *< ) : Channel.gen_in_channel -> string -> dup_arg
Open a file for reading on a Channel.gen_in_channel.
val ( *>& ) : Channel.gen_out_channel -> Channel.dup_out_source -> dup_arg
Dup a Channel.dup_out_source onto a Channel.gen_out_channel.
val ( *> ) : Channel.gen_out_channel -> string -> dup_arg
Open a file for writing on a Channel.gen_out_channel.
val ( *>! ) : Channel.gen_out_channel -> string -> dup_arg
Open a file on a Channel.gen_out_channel, clobbering.
val ( *>? ) : Channel.gen_out_channel -> string -> dup_arg
Open a file on a Channel.gen_out_channel, without clobbering.
val ( *>> ) : Channel.gen_out_channel -> string -> dup_arg
Open a file on a Channel.gen_out_channel, appending.
val ( *>>! ) : Channel.gen_out_channel -> string -> dup_arg
Open a file on a Channel.gen_out_channel, appending, without creating.
val (%<&) : int -> int -> dup_arg
Dup a file descriptor from another file descriptor.
val (%<) : int -> string -> dup_arg
Open a file for reading on a file descriptor.
val (%>&) : int -> int -> dup_arg
Dup a file descriptor from another file descriptor.
val (%>) : int -> string -> dup_arg
Open a file for writing on a file descriptor.
val (%>!) : int -> string -> dup_arg
Open a file on a file descriptor, clobbering.
val (%>?) : int -> string -> dup_arg
Open a file on a file descriptor, without clobbering.
val (%>>) : int -> string -> dup_arg
Open a file on a file descriptor, appending.
val (%>>!) : int -> string -> dup_arg
Open a file on a file descriptor, appending, without creating.
val (/<&) : Pervasives.in_channel -> Pervasives.in_channel -> dup_arg
Dup an in_channel from another in_channel.
val (/<) : Pervasives.in_channel -> string -> dup_arg
Open a file for reading on an in_channel.
val (/>&) : Pervasives.out_channel -> Pervasives.out_channel -> dup_arg
Dup an out_channel from another out_channel.
val (/>) : Pervasives.out_channel -> string -> dup_arg
Open a file for writing on an out_channel.
val (/>!) : Pervasives.out_channel -> string -> dup_arg
Open a file on an out_channel, clobbering.
val (/>?) : Pervasives.out_channel -> string -> dup_arg
Open a file on an out_channel, without clobbering.
val (/>>) : Pervasives.out_channel -> string -> dup_arg
Open a file on an out_channel, appending.
val (/>>!) : Pervasives.out_channel -> string -> dup_arg
Open a file on an out_channel, appending, without creating.
val ( *>% ) : Channel.gen_out_channel -> int -> dup_arg
Dup a Channel.gen_out_channel from a file descriptor.
val ( *>/ ) : Channel.gen_out_channel -> Pervasives.out_channel -> dup_arg
Dup a Channel.gen_out_channel from an out_channel.
val ( %>* ) : int -> Channel.dup_out_source -> dup_arg
Dup a file descriptor from a Channel.dup_out_source.
val (%>/) : int -> Pervasives.out_channel -> dup_arg
Dup a file descriptor from an out_channel.
val ( />* ) : Pervasives.out_channel -> Channel.dup_out_source -> dup_arg
Dup an out_channel from a Channel.dup_out_source.
val (/>%) : Pervasives.out_channel -> int -> dup_arg
Dup an out_channel from a file descriptor.
val ( *<% ) : Channel.gen_in_channel -> int -> dup_arg
Dup a Channel.gen_in_channel from a file descriptor.
val ( *</ ) : Channel.gen_in_channel -> Pervasives.in_channel -> dup_arg
Dup a Channel.gen_in_channel from an in_channel.
val ( %<* ) : int -> Channel.dup_in_source -> dup_arg
Dup a file descriptor from a Channel.dup_in_source.
val (%</) : int -> Pervasives.in_channel -> dup_arg
Dup a file descriptor from an in_channel.
val ( /<* ) : Pervasives.in_channel -> Channel.dup_in_source -> dup_arg
Dup an in_channel from a Channel.dup_in_source.
val (/<%) : Pervasives.in_channel -> int -> dup_arg
Dup an in_channel from a file descriptor.