* Copies files and entire directories.
(source: string, destination: string, opts: CopyFileOptions = {})
| 199 | * Copies files and entire directories. |
| 200 | */ |
| 201 | async copyFile(source: string, destination: string, opts: CopyFileOptions = {}): Promise<void> { |
| 202 | if (!(await fs.hasAccess(source))) { |
| 203 | throw new Error(`The file at '${source}' does not exist or is not accessible`); |
| 204 | } |
| 205 | await fsPromises.cp(source, destination, toCpOptions(opts)); |
| 206 | }, |
| 207 | |
| 208 | /** Create an MD5 hash of a file. */ |
| 209 | async md5(filePath: PathLike): Promise<string> { |
nothing calls this directly
no test coverage detected