Skip to main content

InitTemplateBase.copyFile() method

Copies a single file from the templates folder to the destination.

Signature​

copyFile(input: {
sourceFileRelativePath: string;
destinationFilePath?: string;
}): Promise<void>;

Parameters​

Parameter

Type

Description

{ sourceFileRelativePath, destinationFilePath, }

(not declared)

input

{ sourceFileRelativePath: string; destinationFilePath?: string; }

Returns​

Promise<void>

A promise that resolves when the file has been copied.

Remarks​

This method resolves the source file path relative to the templates folder and copies it to the destination, creating any necessary parent directories. The file is copied without modifications, preserving its content and structure. Use InitTemplateBase.render() instead if variable substitution is needed.


Generated via tsdoc2docusaurus 1.3.2 by API Extractor/Documenter 7.57.2.