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.

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

add (id, path)

Adds a path.

Parameters:

  • string id

    An identifier for the path

  • string path

    The path added

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: