1
0
mirror of https://github.com/lxsang/antd-lua-plugin synced 2024-12-28 18:38:20 +01:00
antd-lua-plugin/example-app/os/fs/fileinfo.lua
2018-09-19 15:08:49 +02:00

9 lines
196 B
Lua

auth_or_die("User unauthorized. Please login")
local vfspath = (JSON.decodeString(REQUEST.query.json)).path
local r,m = require("fs.vfs").fileinfo(vfspath)
if r then
result(m)
else
fail(m)
end