love.filesystem.getRealDirectory
Available since LÖVE 0.9.2 |
This function is not supported in earlier versions. |
Gets the platform-specific absolute path of the directory containing a filepath.
This can be used to determine whether a file is inside the save directory or the game's source .love.
Function
Synopsis
realdir = love.filesystem.getRealDirectory( filepath )
Arguments
string filepath
- The filepath to get the directory of.
Returns
string realdir
- The platform-specific full path of the directory containing the filepath.
Notes
This function returns the directory containing the given file path, rather than file. For example, if the file screenshot1.png
exists in a directory called screenshots
in the game's save directory, love.filesystem.getRealDirectory("screenshots/screenshot1.png")
will return the same value as love.filesystem.getSaveDirectory.
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