file operations in stdlib
This commit is contained in:
parent
1802bce604
commit
de3e3e5d4e
3 changed files with 177 additions and 1 deletions
|
|
@ -232,6 +232,34 @@ func GenFuncTable() ast.FuncTable {
|
|||
TimesCalled: 0,
|
||||
Args: 1,
|
||||
},
|
||||
|
||||
"fexists": &ast.Function{
|
||||
Function: fexists,
|
||||
Name: "file exists",
|
||||
TimesCalled: 0,
|
||||
Args: 1,
|
||||
},
|
||||
|
||||
"fread": &ast.Function{
|
||||
Function: fread,
|
||||
Name: "read file",
|
||||
TimesCalled: 0,
|
||||
Args: 1,
|
||||
},
|
||||
|
||||
"fwrite": &ast.Function{
|
||||
Function: fwrite,
|
||||
Name: "write file",
|
||||
TimesCalled: 0,
|
||||
Args: 2,
|
||||
},
|
||||
|
||||
"fappend": &ast.Function{
|
||||
Function: fappend,
|
||||
Name:"append to file",
|
||||
TimesCalled: 0,
|
||||
Args: 2,
|
||||
},
|
||||
}
|
||||
|
||||
return stdlib
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue