feat: add File.glob for file pattern matching (issue 15)
Add File.glob(pattern) effect operation that returns a list of file paths matching a glob pattern (e.g., "src/**/*.lux"). Implemented across interpreter (using glob crate), JS backend (handler-based), and C backend (using POSIX glob.h). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -964,6 +964,11 @@ impl TypeEnv {
|
||||
],
|
||||
return_type: Type::Unit,
|
||||
},
|
||||
EffectOpDef {
|
||||
name: "glob".to_string(),
|
||||
params: vec![("pattern".to_string(), Type::String)],
|
||||
return_type: Type::List(Box::new(Type::String)),
|
||||
},
|
||||
],
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user