Mercurial > projects > ldc
comparison tango/example/conduits/filecopy.d @ 132:1700239cab2e trunk
[svn r136] MAJOR UNSTABLE UPDATE!!!
Initial commit after moving to Tango instead of Phobos.
Lots of bugfixes...
This build is not suitable for most things.
author | lindquist |
---|---|
date | Fri, 11 Jan 2008 17:57:40 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:5825d48b27d1 | 132:1700239cab2e |
---|---|
1 | |
2 private import tango.io.Console, | |
3 tango.io.FileConduit; | |
4 | |
5 /******************************************************************************* | |
6 | |
7 open a file, and stream directly to console | |
8 | |
9 *******************************************************************************/ | |
10 | |
11 void main (char[][] args) | |
12 { | |
13 if (args.length is 2) | |
14 { | |
15 // open a file for reading | |
16 auto fc = new FileConduit (args[1]); | |
17 | |
18 // stream directly to console | |
19 Cout.stream.copy (fc); | |
20 } | |
21 else | |
22 Cout ("usage is: filecopy filename").newline; | |
23 } |