package.path

Search path used for loading Lua code using the "require" function

Prototype

package.path

Description

This is a string containing the search path used for loading Lua code when using the "require" function. Default values are:

.\?.lua;!\lua\?.lua;!\lua\?\init.lua;!\?.lua;!\?\init.lua
In the above, the package name (eg. "socket") will replace the "?" characters and the current executable pathname (eg. "c:\mushclient") will replace the "!" characters.

Lua functions

Topics