let copy_file src dest = reset_readdir_cache_for (Filename.dirname dest); with_input_file ~bin:true src begin fun ic -> with_output_file ~bin:true dest begin fun oc -> copy_chan ic oc end end