Function copyFile

  • Asynchronous copyFile. Copies a file.

    Parameters

    • src: PathLike

      The source file.

    • dest: PathLike

      The destination file.

    • Optionalmode: number

      Optional flags for the copy operation. Currently supports these flags:

      • fs.constants.COPYFILE_EXCL: If the destination file already exists, the operation fails.

    Returns Promise<void>