Add love.filesystem.getInfo. Deprecate love.filesystem.exists/isDirectory/isFile/isSymlink/getLastModified/getSize. Resolves issue #641.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-08-27 18:14:54 -03:00
parent fcd9f1526c
commit 9d0e984c3d
9 changed files with 227 additions and 201 deletions
+2 -1
View File
@@ -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); });