src/Pure/General/file.ML
changeset 19960 a0e3f2df9b0e
parent 19473 d87a8838afa4
child 21858 05f57309170c
equal deleted inserted replaced
19959:dc3e007aeaf1 19960:a0e3f2df9b0e
   140 fun copy from to = conditional (not (eq (from, to))) (fn () =>
   140 fun copy from to = conditional (not (eq (from, to))) (fn () =>
   141   let val target = if is_dir to then Path.append to (Path.base from) else to
   141   let val target = if is_dir to then Path.append to (Path.base from) else to
   142   in write target (read from) end);
   142   in write target (read from) end);
   143 
   143 
   144 fun copy_dir from to = conditional (not (eq (from, to))) (fn () =>
   144 fun copy_dir from to = conditional (not (eq (from, to))) (fn () =>
   145   (system_command ("cp -r " ^ shell_path from ^ "/. " ^ shell_path to); ()))
   145   (system_command ("cp -r -f " ^ shell_path from ^ "/. " ^ shell_path to); ()))
   146 
   146 
   147 
   147 
   148 (* use ML files *)
   148 (* use ML files *)
   149 
   149 
   150 val use = Output.ML_errors use o platform_path;
   150 val use = Output.ML_errors use o platform_path;