(path: string)
| 247 | constructor(private readonly app: App) {} |
| 248 | |
| 249 | optimistic(path: string): boolean { |
| 250 | const trimmed = path.trim(); |
| 251 | if (!trimmed) return false; |
| 252 | // Untrusted package paths that escape the vault are never "present". |
| 253 | if (escapesVaultBoundary(trimmed)) return false; |
| 254 | return Boolean( |
| 255 | this.app.vault.getAbstractFileByPath(normalizePath(trimmed)), |
| 256 | ); |
| 257 | } |
| 258 | |
| 259 | private async resolve(path: string): Promise<boolean> { |
| 260 | const trimmed = path.trim(); |
no test coverage detected