builtin-os-file: add function fileReadIterator() that creates an iterator over lines of a text file

This commit is contained in:
2026-04-23 19:01:07 +02:00
parent 0677180456
commit b6b09b2fb1
5 changed files with 163 additions and 4 deletions
+4
View File
@@ -250,6 +250,10 @@ func ImportOsFuncs(ctx ExprContext) {
ctx.RegisterFunc("fileReadTextAll", NewGolangFunctor(fileReadTextAllFunc), TypeString, []ExprFuncParam{
NewFuncParam(ParamHandle),
})
ctx.RegisterFunc("fileReadIterator", NewGolangFunctor(fileReadIteratorFunc), TypeIterator, []ExprFuncParam{
NewFuncParam(paramHandleOrPath),
})
}
func init() {