UNPKG

react-native-test-app

Version:

react-native-test-app provides a test app for all supported platforms as a package

29 lines (24 loc) 616 B
// @ts-check import * as nodefs from "node:fs"; const CP_R_OPTIONS = { force: true, recursive: true }; const MKDIR_P_OPTIONS = { recursive: true, mode: 0o755 }; const RM_R_OPTIONS = { force: true, maxRetries: 3, recursive: true }; /** * @param {string} source * @param {string} destination */ export function cp_r(source, destination, fs = nodefs) { fs.cpSync(source, destination, CP_R_OPTIONS); } /** * @param {string} p */ export function mkdir_p(p, fs = nodefs) { fs.mkdirSync(p, MKDIR_P_OPTIONS); } /** * @param {string} p */ export function rm_r(p, fs = nodefs) { fs.rmSync(p, RM_R_OPTIONS); }