Changeset 897
- Timestamp:
- 05/29/06 18:12:01 (2 years ago)
- Files:
-
- trunk/example/filecat.d (modified) (1 diff)
- trunk/example/lineio.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/example/filecat.d
r646 r897 10 10 void main(char[][] args) 11 11 { 12 if (args.length > 2)13 {12 if (args.length > 2) 13 { 14 14 // open the file for writing 15 15 auto dst = new FileConduit (args[1], FileStyle.WriteTruncate); 16 16 17 17 // copy each file onto dst 18 foreach (char[] arg; args[2..args.length])19 dst.copy (new FilePath(arg));18 foreach (char[] arg; args[2..args.length]) 19 dst.copy (new FilePath(arg)); 20 20 21 // flush output and close22 dst.close ();21 // flush output and close 22 dst.close (); 23 23 } 24 else24 else 25 25 Cout ("usage: filecat target source1 ... sourceN"); 26 26 } trunk/example/lineio.d
r754 r897 18 18 void main (char[][] args) 19 19 { 20 if (args.length == 2)21 {20 if (args.length == 2) 21 { 22 22 // open a file for reading 23 23 auto file = new FileConduit (args[1]);
