Skip to main content

is_path_key

Function is_path_key 

Source
pub fn is_path_key(key: &str) -> bool
Expand description

Returns true if key names a JSON field whose values are filesystem paths (e.g. promptPaths, filePath, cwd).

The heuristic matches keys that end with common path suffixes or are well-known path keys. This is intentionally conservative; it is better to match too little (and fail a test explicitly) than too much (and mask a real mismatch).