Issue 11434: std.file.copy doesn't preserve file attributes (eg: executable mode etc)

This is my attempt to address pull request https://github.com/D-Programming-Language/phobos/pull/1747
If there's a machine that's not Windows or POSIX, there will be a compile error on line 2491 because this enum won't exist. There should be an error message from a ```static assert (false, "error message");``` or ```else version(Posix)``` should be shortened to ```else```.