Difference between revisions of "love.filesystem.setCRequirePath"
(Created page with "{{newin|0.11.0|110|type=function}} Sets the filesystem paths that will be searched for c libraries when [http://www.lua.org/manual/5.1/manual.html#pdf-require require] is...") |
(→Synopsis) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
− | {{newin|[[ | + | {{newin|[[11.0]]|110|type=function}} |
Sets the filesystem paths that will be searched for c libraries when [http://www.lua.org/manual/5.1/manual.html#pdf-require require] is called. | Sets the filesystem paths that will be searched for c libraries when [http://www.lua.org/manual/5.1/manual.html#pdf-require require] is called. | ||
Line 8: | Line 8: | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | love.filesystem. | + | love.filesystem.setCRequirePath( paths ) |
</source> | </source> | ||
+ | |||
=== Arguments === | === Arguments === | ||
{{param|string|paths|The paths that the ''require'' function will check in love's filesystem.}} | {{param|string|paths|The paths that the ''require'' function will check in love's filesystem.}} |
Latest revision as of 14:44, 14 December 2018
Available since LÖVE 11.0 |
This function is not supported in earlier versions. |
Sets the filesystem paths that will be searched for c libraries when require is called.
The paths string returned by 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.) Additionally, any occurrence of a double question mark ("??") will be replaced by the name passed to require and the default library extension for the platform.
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.setCRequirePath( paths )
Arguments
string paths
- The paths that the require function will check in love's filesystem.
Returns
Nothing.
Notes
The default paths string is "??"
, which makes require("cool")
try to load cool.dll
, or cool.so
depending on the platform.
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