diff --git a/versions/doc-improvements/docs/api/bait/index.html b/versions/doc-improvements/docs/api/bait/index.html index b672271..d3eb9f4 100644 --- a/versions/doc-improvements/docs/api/bait/index.html +++ b/versions/doc-improvements/docs/api/bait/index.html @@ -27,9 +27,7 @@ this function will set the user prompt.
string
name
The name of the event
function
cb
The function that will be called when the event is thrown.
Returns a list of callbacks that are hooked on an event with the corresponding name
.
string
name
The name of the function
Removes the catcher
for the event with name
.
-For this to work, catcher
has to be the same function used to catch
-an event, like one saved to a variable.
Removes the catcher
for the event with name
.
For this to work, catcher
has to be the same function used to catch
an event, like one saved to a variable.
string
name
Name of the event the hook is on
function
catcher
Hook function to remove
1local hookCallback = function() print 'hi' end
2
diff --git a/versions/doc-improvements/docs/api/commander/index.html b/versions/doc-improvements/docs/api/commander/index.html
index 582a5f8..e11ebd0 100644
--- a/versions/doc-improvements/docs/api/commander/index.html
+++ b/versions/doc-improvements/docs/api/commander/index.html
@@ -20,8 +20,7 @@ This sink is for writing errors, as the name would suggest.
deregister(name) Removes the named command. Note that this will only remove Commander-registered commands. register(name, cb) Adds a new command with the given name
. When Hilbish has to run a command with a name,
commander.deregister(name)
Removes the named command. Note that this will only remove Commander-registered commands.
Parameters
string
name
Name of the command to remove.
commander.register(name, cb)
-
Adds a new command with the given name
. When Hilbish has to run a command with a name,
-it will run the function providing the arguments and sinks.
Parameters
+
Adds a new command with the given name
. When Hilbish has to run a command with a name,
it will run the function providing the arguments and sinks.
Parameters
string
name
Name of the command
function
cb
Callback to handle command invocation
Example
1-- When you run the command `hello` in the shell, it will print `Hello world`.
2-- If you run it with, for example, `hello Hilbish`, it will print 'Hello Hilbish'
diff --git a/versions/doc-improvements/docs/api/fs/index.html b/versions/doc-improvements/docs/api/fs/index.html
index 07b211d..1077634 100644
--- a/versions/doc-improvements/docs/api/fs/index.html
+++ b/versions/doc-improvements/docs/api/fs/index.html
@@ -2,34 +2,56 @@
Module fs
filesystem interaction and functionality library
Introduction
-
The fs module provides easy and simple access to filesystem functions
-and other things, and acts an addition to the Lua standard library’s
-I/O and filesystem functions.
Functions
-
abs(path) -> string Gives an absolute version of path
. basename(path) -> string Gives the basename of path
. For the rules, cd(dir) Changes directory to dir
dir(path) -> string Returns the directory part of path
. For the rules, see Go’s glob(pattern) -> matches (table) Glob all files and directories that match the pattern. join(…) -> string Takes paths and joins them together with the OS’s mkdir(name, recursive) Makes a directory called name
. If recursive
is true, it will create its parent directories. readdir(dir) -> {} Returns a table of files in dir
. stat(path) -> {} Returns a table of info about the path
.
fs.abs(path) -> string
-
Gives an absolute version of path
.
Parameters
-
This function has no parameters.
fs.basename(path) -> string
-
Gives the basename of path
. For the rules,
-see Go’s filepath.Base
Parameters
-
This function has no parameters.
fs.dir(path) -> string
-
Returns the directory part of path
. For the rules, see Go’s
-filepath.Dir
Parameters
-
This function has no parameters.
fs.glob(pattern) -> matches (table)
-
Glob all files and directories that match the pattern.
-For the rules, see Go’s filepath.Glob
Parameters
-
This function has no parameters.
fs.join(...) -> string
-
Takes paths and joins them together with the OS’s
-directory separator (forward or backward slash).
Parameters
-
This function has no parameters.
fs.mkdir(name, recursive)
-
Makes a directory called name
. If recursive
is true, it will create its parent directories.
Parameters
-
This function has no parameters.
fs.stat(path) -> {}
-
Returns a table of info about the path
.
-It contains the following keys:
-name (string) - Name of the path
-size (number) - Size of the path
-mode (string) - Permission mode in an octal format string (with leading 0)
-isDir (boolean) - If the path is a directory
Parameters
-
This function has no parameters.