mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 10:53:14 +01:00
Initial commit after moving to Tango instead of Phobos. Lots of bugfixes... This build is not suitable for most things.
27 lines
573 B
D
27 lines
573 B
D
/*****************************************************
|
|
|
|
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);
|
|
}
|