Skip to content

Instantly share code, notes, and snippets.

@rphillips
Created March 22, 2015 07:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rphillips/59f6cd51723b204da628 to your computer and use it in GitHub Desktop.
Save rphillips/59f6cd51723b204da628 to your computer and use it in GitHub Desktop.
local uv = require('uv')
local timer = require('timer')
local test
local count = 0
function test()
count = count + 1
process.stdin:resume()
process.stdin:on('data', function(data)
if data:find("\n") then
process.stdin:pause()
process.stdin:removeListener('data')
if count == 5 then
uv.walk(p)
else
timer.setImmediate(test)
end
end
end)
end
uv.walk(p)
test()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment