local k,s=pcall(require,"\108\102\115")if not k then error("\076\101\109\117\114 \114\101\113\117\105\114\101\115 \076\117\097\070\105\108\101\083\121\115\116\101\109\044 \119\104\105\099\104 \099\111\117\108\100\110\'\116 \098\101 \102\111\117\110\100\058 "..s)end local b={}function b.isFile(k)return s.attributes(k,"\109\111\100\101")=="\102\105\108\101"end function b.isDirectory(k)return s.attributes(k,"\109\111\100\101")=="\100\105\114\101\099\116\111\114\121"end function b.read(k)local s,b=io.open(k,"\114")if not s then return nil,b end local L=s:read("\042\097\108\108")s:close()return L end b.dir=s.dir return b
local ok, lfs = pcall(require, "lfs")

if not ok then
	error("Lemur requires LuaFileSystem, which couldn't be found: " .. lfs)
end

local fs = {}

function fs.isFile(path)
	return lfs.attributes(path, "mode") == "file"
end

function fs.isDirectory(path)
	return lfs.attributes(path, "mode") == "directory"
end

function fs.read(path)
	local handle, err = io.open(path, "r")

	if not handle then
		return nil, err
	end

	local contents = handle:read("*all")

	handle:close()

	return contents
end

fs.dir = lfs.dir

return fs