-- No need to explain

local File={}

function File.reqsubdir(dir)

  return love.filesystem.getDirectoryItems(dir)

end

function File.reqlua(dir)

  return love.filesystem.load(dir)

end

function File.tostr(file)

  return love.filesystem.read(file)

end

function File.fromstr(data,file)

  local lfile=io.open(file,"w")
  lfile:write(data)
  lfile:close()

end

function File.dcfromtoml(file)

  return Toml.parse(File.tostr(file),{strict=false})

end

function File.ectotoml(data,file)

  -- Can lead to issues, io handle path differently
  
  local lfile=io.open(file,"w")
  lfile:write(Toml.encode(data))
  lfile:close()

end

return File
