Module Files
|
Function
|
Description
|
|
AppendToFile(filename: string, val: string): nil
|
Appends val to the end of the file.
|
|
AppendToFile(filename: string, val: string, charset: string): nil
|
As above, but sets the character encoding to use. Typical encodings are "iso-8859-1", "UTF8", etc.
|
|
Exists(filename: string): bool
|
Determines if a file with the specified name exists.
|
|
LoadFromFile(filename: string, mimetype: string): page
|
Loads a page object from a file.
|
|
LoadStringFromFile(filename: string): string
|
Loads a file as a string object.
|
|
SaveToFile(filename: string, val: string): nil
|
Saves the string val to the specified file.
|
|
SaveToFile(filename: string, val: string, charset: string): nil
|
As above, but overrides the default character encoding of the saved file. Typical encodings are "iso-8859-1", "UTF8", etc.
|
|
GetURL(url: string, filename: string): page
GetURL(url: string, filename: string, param: {object,string}): page
GetURL(url: string, filename: string, param: {object,string}, header: object): page
GetURL(url: string, filename: string, param: {object,string}, header: object, options: object): page
|
Similar to the built-in GetURL function except that the retrieved document is saved to the indicated file. The url, param, header and option arguments are the same as the built-in GetURL function.
|
|
PostURL(url: string, filename: string): page
PostURL(url: string, filename: string, param: {object,string}): page
PostURL(url: string, filename: string, param: {object,string}, header: object): page
PostURL(url: string, filename: string, param: {object,string}, header: object, options: object): page
|
Similar to the built-in PostURL function except that the retrieved document is saved to the indicated file. The url, param, header and options arguments are the same as the built-in PostURL function.
|
|
Eval(filename: string): any
|
The cotnets of filename is evaluated as a WebL program. The result returned is the value of the last statement in the program.
|
|
List(dirname: string): list
|
Returns the file names and directory names contained in directory dirname.
|
|
IsDir(name: string): bool
|
Checks whether name is a valid directory name or not.
|
|
IsFile(name: string): bool
|
Checks whether name is a valid file name or not.
|
|
Mkdir(name: string): bool
|
Attempts to create a new
directory called name, and returns success or failure.
|
|
Delete(name: string): bool
|
Attempts to delete the file called name, and returns success or failure.
|