Skip to main content

XpmInitTemplateBase.copyFile() method

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

Signature

copyFile(sourceFileRelativePath: string, destinationFilePath?: string): Promise<void>;

Parameters

Parameter

Type

Description

sourceFileRelativePath

string

The relative path to the source file within the templates folder.

destinationFilePath

string

(Optional) The destination file path (defaults to the same relative path as the source).

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 XpmInitTemplateBase.render() instead if variable substitution is needed.


Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.