VirtualFileExists checks if a path exists in the virtual filesystem.
(path string)
| 23 | |
| 24 | // VirtualFileExists checks if a path exists in the virtual filesystem. |
| 25 | func VirtualFileExists(path string) bool { |
| 26 | if virtualFiles == nil { |
| 27 | return false |
| 28 | } |
| 29 | _, ok := virtualFiles[path] |
| 30 | return ok |
| 31 | } |
| 32 | |
| 33 | func init() { |
| 34 | // Override readFileFunc in wasm builds to check virtual files first. |
no outgoing calls
no test coverage detected