Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 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