MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / tryCreateSymlink

Function tryCreateSymlink

packages/core/src/safePath.test.ts:23–30  ·  view source on GitHub ↗
(target: string, path: string, type: "dir" | "file")

Source from the content-addressed store, hash-verified

21 // Mirror the repo convention (preview.test.ts): non-symlink-privileged Windows
22 // runners can't create symlinks — skip those cases rather than crash the suite.
23 function tryCreateSymlink(target: string, path: string, type: "dir" | "file"): boolean {
24 try {
25 symlinkSync(target, path, type);
26 return true;
27 } catch {
28 return false;
29 }
30 }
31
32 it("allows the base directory itself", () => {
33 const base = tmpDir("safepath-base-");

Callers 1

safePath.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected