On Windows, implement "Filesystem::copyFile()" with "copy()"


On Windows, implement "Filesystem::copyFile()" with "copy()"

Ref T13562. Currently, "Filesystem::copyFile()" uses "copy", which doesn't work now that we no longer invoke "cmd.exe" by default.

Use "copy()" instead.

Note that this whole function is probably nonsense, but I'll follow up on T13562.

Test Plan:

  • Created a standalone script which runs "Filesystem::copyFile()".
    • Before: failed to copy any file.
    • After: succesfully copied normal files.
    • After: failed to copy a file over an existing directory with a reasonable error.
    • After: failed to copy a file over itself with a reasonable error.

Maniphest Tasks: T13562

Differential Revision: https://secure.phabricator.com/D21643