Function copyFileSync

  • Synchronous copyFile. Copies a file.

    Parameters

    • src: PathLike

      The source file.

    • dest: PathLike

      The destination file.

    • Optional flags: 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