diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-01-22 16:07:06 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-01-22 16:07:06 +0800 |
commit | d4b4de10daf18e389fc2b1c5d06e20ed433fcf04 (patch) | |
tree | 5af41a1abf037c433d04bf257f30099cb93c01bd /server/src/async/scanfiles.lua | |
parent | 4ffc826d7ce5ca57c2929e040ed5eefb53f9d115 (diff) | |
download | lua-language-server-d4b4de10daf18e389fc2b1c5d06e20ed433fcf04.zip |
整理代码
Diffstat (limited to 'server/src/async/scanfiles.lua')
-rw-r--r-- | server/src/async/scanfiles.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/server/src/async/scanfiles.lua b/server/src/async/scanfiles.lua new file mode 100644 index 00000000..900cc0a8 --- /dev/null +++ b/server/src/async/scanfiles.lua @@ -0,0 +1,17 @@ +local root = ... + +require 'utility' +local fs = require 'bee.filesystem' +local list = {} +local ignore = { + ['.git'] = true, + ['node_modules'] = true, +} + +for path in io.scan(fs.path(root), ignore) do + if path:extension():string() == '.lua' then + list[#list+1] = path:string() + end +end + +OUT:push(list) |