Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/File-input-output/Standard-ML/file-input-output.ml
Normal file
10
Task/File-input-output/Standard-ML/file-input-output.ml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
fun copyFile (from, to) =
|
||||
let
|
||||
val instream = TextIO.openIn from
|
||||
val outstream = TextIO.openOut to
|
||||
val () = TextIO.output (outstream, TextIO.inputAll instream)
|
||||
val () = TextIO.closeIn instream
|
||||
val () = TextIO.closeOut outstream
|
||||
in
|
||||
true
|
||||
end handle _ => false;
|
||||
Loading…
Add table
Add a link
Reference in a new issue