Another update from ingydotnet^djgoku

This commit is contained in:
Ingy döt Net 2015-11-18 06:14:39 +00:00
parent 91df62d461
commit 948b86eafa
7604 changed files with 108452 additions and 22726 deletions

View file

@ -1,15 +1,5 @@
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;
void main() {
import std.file;
auto data = std.file.read("input.txt");
std.file.write("output.txt", data);
}

View file

@ -1,9 +1,15 @@
import tango.io.device.File;
import std.stdio;
void main()
{
auto from = new File("input.txt");
auto to = new File("output.txt", File.WriteCreate);
to.copy(from).close;
from.close;
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

@ -2,6 +2,8 @@ import tango.io.device.File;
void main()
{
auto from = new File("input.txt");
auto to = new File("output.txt", File.WriteCreate);
to.copy(new File("input.txt")).close;
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;
}