tweaks
This commit is contained in:
@@ -118,12 +118,16 @@ function Event.off(h)
|
||||
end
|
||||
|
||||
function Event.onInterval(interval, fn)
|
||||
return Event.addRoutine(function()
|
||||
local h = Event.addRoutine(function()
|
||||
while true do
|
||||
os.sleep(interval)
|
||||
fn()
|
||||
end
|
||||
end)
|
||||
function h.updateInterval(i)
|
||||
interval = i
|
||||
end
|
||||
return h
|
||||
end
|
||||
|
||||
function Event.onTimeout(timeout, fn)
|
||||
|
||||
@@ -36,6 +36,7 @@ end
|
||||
local methods = { 'delete', 'exists', 'getFreeSpace', 'makeDir', 'list', 'listEx' }
|
||||
|
||||
local function resolveDir(dir, node)
|
||||
-- TODO: Wrong ! (does not support names with dashes)
|
||||
dir = dir:gsub(node.mountPoint, '', 1)
|
||||
return fs.combine(node.directory, dir)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user