lux.path a LUX module
A module for managing Lua’s paths.
Functions
-
get ()
-
Gets the current path.
Returns:
-
string
The current path
-
search (mod)
-
Searches for a lua module in the current path.
Parameters:
-
string
mod
The module to be searched
Returns:
-
string
The path to the Lua file if it is found, or else
nil
plus the the sequence of files it checked. -
string
mod
-
clear (default_path, set)
-
Clears all registered paths and set path handler
Parameters:
-
function
default_path
The default path
-
function
set
A function that sets the current path
-
function
default_path
-
add (id, path)
-
Adds a path.
Parameters:
See also:
-
remove (id)
-
Removes the path assigned to the given identifier.
Parameters:
-
string
id
The identifier for the to-be-removed path
See also:
-
string
id