-if luci.fs.access(sysfs_path) then
- for k, v in pairs(luci.fs.dir(sysfs_path)) do
- if v ~= "." and v ~= ".." then
- table.insert(leds, v)
- end
- end
+local fs = require "nixio.fs"
+local util = require "nixio.util"
+
+if fs.access(sysfs_path) then
+ leds = util.consume((fs.dir(sysfs_path)))