LoadFile loads a single bootstrap file (workspace first, then global).
(filename string)
| 78 | |
| 79 | // LoadFile loads a single bootstrap file (workspace first, then global). |
| 80 | func (bl *BootstrapLoader) LoadFile(filename string) (string, bool) { |
| 81 | // Try workspace first |
| 82 | workspacePath := filepath.Join(bl.workspaceDir, filename) |
| 83 | if content, ok := bl.loadWithCache(workspacePath); ok { |
| 84 | return content, true |
| 85 | } |
| 86 | |
| 87 | // Fall back to global |
| 88 | globalPath := filepath.Join(bl.globalDir, filename) |
| 89 | if content, ok := bl.loadWithCache(globalPath); ok { |
| 90 | return content, true |
| 91 | } |
| 92 | |
| 93 | return "", false |
| 94 | } |
| 95 | |
| 96 | // IsStale checks if any cached file has been modified on disk. |
| 97 | func (bl *BootstrapLoader) IsStale() bool { |