| hide_title | true |
|---|---|
| custom_edit_url | |
| pagination_prev | |
| pagination_next |
Home > @rushstack/node-core-library > FileSystem > copyFile
Copies a single file from one location to another. By default, destinationPath is overwritten if it already exists.
Signature:
static copyFile(options: IFileSystemCopyFileOptions): void;|
Parameter |
Type |
Description |
|---|---|---|
|
options |
Returns:
void
The copyFile() API cannot be used to copy folders. It copies at most one file. Use FileSystem.copyFiles() if you need to recursively copy a tree of folders.
The implementation is based on copySync() from the fs-extra package.