Mercurial > projects > ldc
view tango/example/conduits/mmap.d @ 348:3c5e19bfcbf2 trunk
[svn r369] Fix nested classes when nestedVar is not generated.
author | ChristianK |
---|---|
date | Sun, 13 Jul 2008 21:16:40 +0200 |
parents | 1700239cab2e |
children |
line wrap: on
line source
private import tango.io.Console, tango.io.FileConduit, tango.io.MappedBuffer; /******************************************************************************* open a file, map it into memory, and copy to console *******************************************************************************/ void main (char[][] args) { if (args.length is 2) { // open a file for reading auto mmap = new MappedBuffer (new FileConduit (args[1])); // copy content to console Cout (cast(char[]) mmap.slice) (); } else Cout ("usage is: mmap filename").newline; }