MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / clonePath

Function clonePath

scripts/codex-worktree-cache.mjs:230–255  ·  view source on GitHub ↗
(source, destination)

Source from the content-addressed store, hash-verified

228}
229
230function clonePath(source, destination) {
231 const stats = statSync(source);
232 if (stats.isFile()) {
233 try {
234 copyFileSync(source, destination, constants.COPYFILE_FICLONE);
235 } catch {
236 copyFileSync(source, destination);
237 }
238 return;
239 }
240
241 try {
242 cpSync(source, destination, {
243 recursive: true,
244 verbatimSymlinks: true,
245 preserveTimestamps: true,
246 mode: constants.COPYFILE_FICLONE,
247 });
248 } catch {
249 cpSync(source, destination, {
250 recursive: true,
251 verbatimSymlinks: true,
252 preserveTimestamps: true,
253 });
254 }
255}
256
257function existsAndHasContent(path) {
258 try {

Callers 1

copyIntoPlaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected