I have some code which uses LuaFileSystem. However not all systems it will be run on have LuaFileSystem installed. I would like to check if it is installed, and only run the code if it is. Something like this (but this fails and states lfs is a null value)
local lfsExists, lfs = pcall(function () require "lfs" end)
if lfsExists then
local lastUpdateTime = lfs.attributes( mapFilePName ).modification
end