(filePath: string)
| 440 | } |
| 441 | |
| 442 | async function isSymlink(filePath: string) { |
| 443 | try { |
| 444 | return (await lstat(filePath)).isSymbolicLink(); |
| 445 | } catch (error) { |
| 446 | if (error instanceof Error && "code" in error && error.code === "ENOENT") return false; |
| 447 | throw error; |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | async function readModelMetadata(modelsDir: string) { |
| 452 | const metadataDir = modelMetadataDir(modelsDir); |