Changed some function names and param types
This commit is contained in:
+7
-7
@@ -221,33 +221,33 @@ func fileReadTextAllFunc(ctx ExprContext, name string, args map[string]any) (res
|
||||
}
|
||||
|
||||
func ImportOsFuncs(ctx ExprContext) {
|
||||
ctx.RegisterFunc("fileOpen", NewGolangFunctor2(openFileFunc), TypeFileHandle, []ExprFuncParam{
|
||||
ctx.RegisterFunc("fileOpen", NewGolangFunctor(openFileFunc), TypeFileHandle, []ExprFuncParam{
|
||||
NewFuncParam(ParamFilepath),
|
||||
})
|
||||
|
||||
ctx.RegisterFunc("fileAppend", NewGolangFunctor2(appendFileFunc), TypeFileHandle, []ExprFuncParam{
|
||||
ctx.RegisterFunc("fileAppend", NewGolangFunctor(appendFileFunc), TypeFileHandle, []ExprFuncParam{
|
||||
NewFuncParam(ParamFilepath),
|
||||
})
|
||||
|
||||
ctx.RegisterFunc("fileCreate", NewGolangFunctor2(createFileFunc), TypeFileHandle, []ExprFuncParam{
|
||||
ctx.RegisterFunc("fileCreate", NewGolangFunctor(createFileFunc), TypeFileHandle, []ExprFuncParam{
|
||||
NewFuncParam(ParamFilepath),
|
||||
})
|
||||
|
||||
ctx.RegisterFunc("fileClose", NewGolangFunctor2(closeFileFunc), TypeBoolean, []ExprFuncParam{
|
||||
ctx.RegisterFunc("fileClose", NewGolangFunctor(closeFileFunc), TypeBoolean, []ExprFuncParam{
|
||||
NewFuncParam(ParamHandle),
|
||||
})
|
||||
|
||||
ctx.RegisterFunc("fileWriteText", NewGolangFunctor2(fileWriteTextFunc), TypeInt, []ExprFuncParam{
|
||||
ctx.RegisterFunc("fileWriteText", NewGolangFunctor(fileWriteTextFunc), TypeInt, []ExprFuncParam{
|
||||
NewFuncParam(ParamHandle),
|
||||
NewFuncParamFlagDef(ParamItem, PfDefault|PfRepeat, ""),
|
||||
})
|
||||
|
||||
ctx.RegisterFunc("fileReadText", NewGolangFunctor2(fileReadTextFunc), TypeString, []ExprFuncParam{
|
||||
ctx.RegisterFunc("fileReadText", NewGolangFunctor(fileReadTextFunc), TypeString, []ExprFuncParam{
|
||||
NewFuncParam(ParamHandle),
|
||||
NewFuncParamFlagDef(osLimitCh, PfDefault, "\n"),
|
||||
})
|
||||
|
||||
ctx.RegisterFunc("fileReadTextAll", NewGolangFunctor2(fileReadTextAllFunc), TypeString, []ExprFuncParam{
|
||||
ctx.RegisterFunc("fileReadTextAll", NewGolangFunctor(fileReadTextAllFunc), TypeString, []ExprFuncParam{
|
||||
NewFuncParam(ParamHandle),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user