Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,5 @@
import std.file: copy;
void main() {
copy("input.txt", "output.txt");
}

View file

@ -0,0 +1,5 @@
void main() {
import std.file;
auto data = std.file.read("input.txt");
std.file.write("output.txt", data);
}

View file

@ -0,0 +1,15 @@
import std.stdio;
int main() {
auto from = File("input.txt", "rb");
scope(exit) from.close();
auto to = File("output.txt", "wb");
scope(exit) to.close();
foreach(buffer; from.byChunk(new ubyte[4096*1024])) {
to.rawWrite(buffer);
}
return 0;
}

View file

@ -0,0 +1,9 @@
import tango.io.device.File;
void main()
{
auto from = new File("input.txt");
auto to = new File("output.txt", File.WriteCreate);
to.copy(from).close;
from.close;
}

View file

@ -0,0 +1,7 @@
import tango.io.device.File;
void main()
{
auto to = new File("output.txt", File.WriteCreate);
to.copy(new File("input.txt")).close;
}