(input: string)
| 97 | * cwd — into an absolute filesystem path. Returns undefined for empty input. |
| 98 | */ |
| 99 | export function resolveLinkTarget(input: string): string | undefined { |
| 100 | let value = input.trim() |
| 101 | if (!value) return undefined |
| 102 | if (value.startsWith("~/")) value = path.join(os.homedir(), value.slice(2)) |
| 103 | return path.resolve(value) |
| 104 | } |
| 105 | |
| 106 | export interface LinkResult { |
| 107 | ok: boolean |