BuiltinVirtualFileExists returns true if the given path is registered as a builtin virtual file.
(path string)
| 45 | |
| 46 | // BuiltinVirtualFileExists returns true if the given path is registered as a builtin virtual file. |
| 47 | func BuiltinVirtualFileExists(path string) bool { |
| 48 | builtinVirtualFilesMu.RLock() |
| 49 | defer builtinVirtualFilesMu.RUnlock() |
| 50 | _, ok := builtinVirtualFiles[path] |
| 51 | virtualFsLog.Printf("BuiltinVirtualFileExists: path=%s exists=%t", path, ok) |
| 52 | return ok |
| 53 | } |
| 54 | |
| 55 | // builtinFrontmatterCache caches the result of parsing frontmatter for builtin virtual files. |
| 56 | // Builtin files are immutable (registered once at startup), so the parse result is stable |