Function CopyFile

  • Copies a file from the source path to the destination path asynchronously.

    Parameters

    • src: string

      The source path of the file to be copied.

    • dest: string

      The destination path where the file will be copied.

    • checkSrcExists: boolean = false

      If true, checks whether the source file exists before copying.

    Returns Promise<boolean>

    A Promise that resolves to true if the file is copied successfully, or false if the source file doesn't exist.

    "/path/to/source/file.txt" -> "/path/to/destination/file.txt"
    

    3.0.0

    2021-09-13