MCPcopy Create free account
hub / github.com/appium/appium / copyFile

Function copyFile

packages/support/lib/fs.ts:201–206  ·  view source on GitHub ↗

* Copies files and entire directories.

(source: string, destination: string, opts: CopyFileOptions = {})

Source from the content-addressed store, hash-verified

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> {

Callers

nothing calls this directly

Calls 1

toCpOptionsFunction · 0.85

Tested by

no test coverage detected