-
-
Save rphillips/59f6cd51723b204da628 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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