package stdune
Module Stdune.IoSource
IO operations.
Try to read everything from a channel. Returns Error () if the contents are larger than Sys.max_string_length. This is generally a problem only on 32-bit systems. Overflow detection does not happen in the following cases:
- channel is not a file (for example, a pipe)
- if the detected size is unreliable (/proc)
- race condition with another process changing the size of the underlying file. In these cases, an exception might be raised by
Bufferfunctions.
Source
val setup_copy :
?chmod:(int -> int) ->
src:path ->
dst:path ->
unit ->
in_channel * out_channelreads a file and prints its contents to stdout or the specified channel
Symlink with fallback to copy on systems that don't support it.
Hardlink with fallback to copy on systems that don't support it.