Advertisement
Guest User

Untitled

a guest
Aug 7th, 2014
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.26 KB | None | 0 0
  1. let copy_file src dest =
  2.   let ic = open_in src in
  3.   let oc = open_out dest in
  4.   try
  5.     while true do
  6.       let line = input_line ic in
  7.       output_string oc line;
  8.       output_char oc '\n'
  9.     done
  10.   with
  11.     Sys_error m ->
  12.     print_endline "error"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement