Skip to content

Latest commit

 

History

History
64 lines (34 loc) · 1.23 KB

File metadata and controls

64 lines (34 loc) · 1.23 KB
hide_title true
custom_edit_url
pagination_prev
pagination_next

Home > @rushstack/node-core-library > FileSystem > copyFile

FileSystem.copyFile() method

Copies a single file from one location to another. By default, destinationPath is overwritten if it already exists.

Signature:

static copyFile(options: IFileSystemCopyFileOptions): void;

Parameters

Parameter

Type

Description

options

IFileSystemCopyFileOptions

Returns:

void

Remarks

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.