Function copyFileSync

  • Synchronous copyFile. Copies a file.

    Parameters

    • source: PathLike
    • destination: PathLike
    • Optionalflags: 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 void