mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Add love.filesystem.getInfo. Deprecate love.filesystem.exists/isDirectory/isFile/isSymlink/getLastModified/getSize. Resolves issue #641.
--HG-- branch : minor
This commit is contained in:
@@ -1220,7 +1220,8 @@ static int w_getShaderSource(lua_State *L, int startidx, bool gles, Shader::Shad
|
||||
size_t slen = 0;
|
||||
const char *str = lua_tolstring(L, i, &slen);
|
||||
|
||||
if (fs != nullptr && fs->isFile(str))
|
||||
Filesystem::Info info = {};
|
||||
if (fs != nullptr && fs->getInfo(str, info))
|
||||
{
|
||||
FileData *fd = nullptr;
|
||||
luax_catchexcept(L, [&](){ fd = fs->read(str); });
|
||||
|
||||
Reference in New Issue
Block a user