mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-29 10:30:04 +02:00
[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.
This commit is contained in:
26
tango/example/conduits/fileops.d
Normal file
26
tango/example/conduits/fileops.d
Normal file
@@ -0,0 +1,26 @@
|
||||
/*****************************************************
|
||||
|
||||
Example that shows some simple file operations
|
||||
|
||||
Put into public domain by Lars Ivar Igesund
|
||||
|
||||
*****************************************************/
|
||||
|
||||
import tango.io.Stdout;
|
||||
|
||||
import tango.io.FilePath;
|
||||
|
||||
void main (char[][] args)
|
||||
{
|
||||
auto src = args[0] ~ ".d";
|
||||
auto dst = new FilePath (args[0] ~ ".d.copy");
|
||||
|
||||
Stdout.formatln ("copy file {} to {}", src, dst);
|
||||
dst.copy (src);
|
||||
assert (dst.exists);
|
||||
|
||||
Stdout.formatln ("removing file {}", dst);
|
||||
dst.remove;
|
||||
|
||||
assert (dst.exists is false);
|
||||
}
|
||||
Reference in New Issue
Block a user