MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / tryResolveRealFile

Function tryResolveRealFile

packages/vite/src/bridge/fsUtils.ts:10–20  ·  view source on GitHub ↗
(file: string, preserveSymlinks?: boolean)

Source from the content-addressed store, hash-verified

8 * @internal
9 */
10export function tryResolveRealFile(file: string, preserveSymlinks?: boolean): string | undefined {
11 const fileStat = tryStatSync(file);
12 if (fileStat?.isFile()) {
13 return file;
14 }
15 if (fileStat?.isSymbolicLink()) {
16 return preserveSymlinks ? file : fs.realpathSync(file);
17 }
18
19 return undefined;
20}

Callers 1

tryCleanFsResolveFunction · 0.90

Calls 1

tryStatSyncFunction · 0.90

Tested by

no test coverage detected