mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-13 11:23:14 +01:00
Initial commit after moving to Tango instead of Phobos. Lots of bugfixes... This build is not suitable for most things.
24 lines
609 B
D
24 lines
609 B
D
|
|
private import tango.io.Console,
|
|
tango.io.FileConduit;
|
|
|
|
/*******************************************************************************
|
|
|
|
open a file, and stream directly to console
|
|
|
|
*******************************************************************************/
|
|
|
|
void main (char[][] args)
|
|
{
|
|
if (args.length is 2)
|
|
{
|
|
// open a file for reading
|
|
auto fc = new FileConduit (args[1]);
|
|
|
|
// stream directly to console
|
|
Cout.stream.copy (fc);
|
|
}
|
|
else
|
|
Cout ("usage is: filecopy filename").newline;
|
|
}
|