package - reimplementation of the Lua standard package library
package is a partial re-implementation of the Lua-standard package library.
searchpath(name:string, path:string[, sep:string[, rep:string]]): string or nil, table
Used internally by require. Searches the provided path for name. Replaces all instances of ? in the path with name.
path is expected to be formatted as a series of entries separated by the ; character.
protect(tbl:table[, name:string]): table
Returns a protected (i.e. read-only) version of the provided table. Note that rawset is wrapped specifically to allow this function to work.
Set the metatable of library lib such that, when an attempt is made to index a nonexistent field, the provided file will be loaded. If the field is found, the metatable returns it.
The package library defines the following globals.
A cache of all loaded libraries.
The path to search for libraries.
dofile(file:string): ... or nil, string
Attempt to execute file file.
require(lib:string[, reload:boolean]): ...
Attempt to load library lib from the package path. If the library is already loaded and reload is false or not specified, returns the cached library. Othwewise, reloads the library from disk.
On failure, require raises the error rather than returning it.
Monolith System Interfaces (c) 2020 Ocawesome101 under the GNU GPLv3.