copyFile

Copies a file.

Note that attributes and time stamps are currently not retained.

  1. void copyFile(Path from, Path to, bool overwrite)
    @safe
    void
    copyFile
    (
    Path from
    ,
    Path to
    ,
    bool overwrite = false
    )
  2. void copyFile(string from, string to)

Parameters

from Path

Path of the source file

to Path

Path for the destination file

overwrite bool

If true, any file existing at the destination path will be overwritten. If this is false, an exception will be thrown should a file already exist at the destination path.

Throws

An Exception if the copy operation fails for some reason.

Meta