Mercurial > projects > ldc
comparison tango/example/conduits/fileops.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 | |
3 Example that shows some simple file operations | |
4 | |
5 Put into public domain by Lars Ivar Igesund | |
6 | |
7 *****************************************************/ | |
8 | |
9 import tango.io.Stdout; | |
10 | |
11 import tango.io.FilePath; | |
12 | |
13 void main (char[][] args) | |
14 { | |
15 auto src = args[0] ~ ".d"; | |
16 auto dst = new FilePath (args[0] ~ ".d.copy"); | |
17 | |
18 Stdout.formatln ("copy file {} to {}", src, dst); | |
19 dst.copy (src); | |
20 assert (dst.exists); | |
21 | |
22 Stdout.formatln ("removing file {}", dst); | |
23 dst.remove; | |
24 | |
25 assert (dst.exists is false); | |
26 } |