Data update

This commit is contained in:
Ingy dot Net 2024-04-19 16:56:29 -07:00
parent 0df55f9f24
commit aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions

View file

@ -1,4 +1,5 @@
fun copyFile (from, to) =
(* string -> string -> bool *)
fun copyFile from to =
let
val instream = TextIO.openIn from
val outstream = TextIO.openOut to
@ -7,4 +8,4 @@ let
val () = TextIO.closeOut outstream
in
true
end handle _ => false;
end handle _ => false

View file

@ -0,0 +1,15 @@
fun copyFile from to =
let
val instream = BinIO.openIn from
val outstream = BinIO.openOut to
fun aux () =
let
val buf = BinIO.inputN(instream, 1024)
in
if Word8Vector.length buf = 0
then ()
else (BinIO.output (outstream, buf); aux ())
end
in
(aux (); BinIO.closeIn instream; BinIO.closeOut outstream)
end