love.filesystem.getInfo
Available since LÖVE 11.0 |
This function replaces love.filesystem.exists, isFile, isDirectory, isSymlink, getLastModified, and getSize. |
Gets information about the specified file or directory.
Contents
Function
Synopsis
info = love.filesystem.getInfo( path, filtertype )
Arguments
string path
- The file or directory path to check.
FileType filtertype (nil)
- If supplied, this parameter causes getInfo to only return the info table if the item at the given path matches the specified file type.
Returns
table info (nil)
- A table containing information about the specified path, or nil if nothing exists at the path. The table contains the following fields:
Function
This variant accepts an existing table to fill in, instead of creating a new one.
Synopsis
info = love.filesystem.getInfo( path, info )
Arguments
string path
- The file or directory path to check.
table info
- A table which will be filled in with info about the specified path.
Returns
table info (nil)
- The table given as an argument, or nil if nothing exists at the path. The table will be filled in with the following fields:
Function
This variant only returns info if the item at the given path is the same file type as specified in the filtertype argument, and accepts an existing table to fill in, instead of creating a new one.
Synopsis
info = love.filesystem.getInfo( path, filtertype, info )
Arguments
string path
- The file or directory path to check.
FileType filtertype
- Causes getInfo to only return the info table if the item at the given path matches the specified file type.
table info
- A table which will be filled in with info about the specified path.
Returns
table info (nil)
- The table given as an argument, or nil if nothing exists at the path. The table will be filled in with the following fields:
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