mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Add a variant of love.filesystem.getInfo which filters based on file type. getInfo(filename, "directory") will only return info for non-symlinked directories, for example.
This commit is contained in:
@@ -130,6 +130,11 @@ bool Filesystem::getConstant(FileType in, const char *&out)
|
||||
return fileTypes.find(in, out);
|
||||
}
|
||||
|
||||
std::vector<std::string> Filesystem::getConstants(FileType)
|
||||
{
|
||||
return fileTypes.getNames();
|
||||
}
|
||||
|
||||
StringMap<Filesystem::FileType, Filesystem::FILETYPE_MAX_ENUM>::Entry Filesystem::fileTypeEntries[] =
|
||||
{
|
||||
{ "file", FILETYPE_FILE },
|
||||
|
||||
Reference in New Issue
Block a user