love.filesystem.setRequirePath
Available since LÖVE 0.10.0 |
This function is not supported in earlier versions. |
Sets the filesystem paths that will be searched when require is called.
The paths string given to this function is a sequence of path templates separated by semicolons. The argument passed to require will be inserted in place of any question mark ("?") character in each template (after the dot characters in the argument passed to require are replaced by directory separators.)
The paths are relative to the game's source and save directories, as well as any paths mounted with love.filesystem.mount.
Function
Synopsis
love.filesystem.setRequirePath( paths )
Arguments
string paths
- The paths that the require function will check in love's filesystem. The default paths string is
"?.lua;?/init.lua"
, which makesrequire("cool")
try to loadcool.lua
and then trycool/init.lua
if cool.lua doesn't exist.
Returns
Nothing.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info