mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
Update io.h
This commit is contained in:
parent
765fb83007
commit
7b27c67544
8
src/io.h
8
src/io.h
@ -114,6 +114,14 @@ void add_module_os(VM* vm){
|
||||
if(!ok) vm->IOError("operation failed");
|
||||
return vm->None;
|
||||
});
|
||||
|
||||
vm->bind_func<-1>(mod, "path_join", [](VM* vm, const Args& args){
|
||||
std::filesystem::path path;
|
||||
for(int i=0; i<args.size(); i++){
|
||||
path /= CAST(Str&, args[i]).c_str();
|
||||
}
|
||||
return VAR(path.string());
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace pkpy
|
||||
|
Loading…
x
Reference in New Issue
Block a user