The Help API allows you to mess around with the help files.
Methods
Method name
|
Description
|
path()
|
Returns the path the help API has been set to
|
setPath(string path)
|
Sets the path of the API to path
|
lookup(string topic)
|
Looks up the help file for topic
|
topic()
|
Returns a table of valid help topics
|
help.path
Function help.path |
Syntax |
help.path() |
Returns |
string path of help API |
Description |
Returns the current path for the help API |
Examples
Description |
Prints the current path for the help API |
Code |
print(help.path())
|
Output |
/rom/help |
help.setPath
Function help.setPath |
Syntax |
help.setPath(string path) |
Returns |
nil |
Description |
Sets a new path for the help API |
Examples
Description |
Sets the path of the help API to /disk/help |
Code |
help.setPath("/disk/help")
|
help.lookup
Function help.lookup |
Syntax |
help.lookup(string topic) |
Returns |
string path of help file for topic or nil |
Description |
Looks up the path for a help file using the help.path() directory. |
Examples
Description |
Looks up the path for the disk api |
Code |
print(help.lookup("disk"))
|
Output |
/rom/help/disk |
help.topics
Function help.topics |
Syntax |
help.topics() |
Returns |
table all valid topics |
Description |
Lists all valid help topics |
Examples
Description |
Lists all valid help topics |
Code |
for i,v in pairs(help.topics()) do print(v) end
|
Output |
List of all valid help topics |