diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-01-29 09:47:21 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-01-29 09:47:21 +0800 |
commit | daa0b48c627cb1ed15a65e7e6330ca6c81627510 (patch) | |
tree | 3bdad898316e1c394c26f0d538595beef1123300 /server/src/utility.lua | |
parent | b684462e3e1722454baf80f756c3b3a81c390053 (diff) | |
parent | ae5c35babefe1eca7a3c85db68ffb74ffc18abf1 (diff) | |
download | lua-language-server-daa0b48c627cb1ed15a65e7e6330ca6c81627510.zip |
Merge branch 'master' into global
Diffstat (limited to 'server/src/utility.lua')
-rw-r--r-- | server/src/utility.lua | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/server/src/utility.lua b/server/src/utility.lua index ee15bf38..b0d44a60 100644 --- a/server/src/utility.lua +++ b/server/src/utility.lua @@ -142,45 +142,3 @@ function io.save(file_path, content) return false, e end end - -function io.scan(path, ignore) - local result = {path} - local i = 0 - local absolute - if ignore then - absolute = {} - for _, name in ipairs(ignore) do - local absoluteName = fs.path(name):string():lower() - absolute[#absolute+1] = absoluteName - end - end - - local function isIgnored(path) - if not absolute then - return false - end - local target = path:string():lower() - for _, name in ipairs(absolute) do - if target == name then - return true - end - end - return false - end - - return function () - i = i + 1 - local current = result[i] - if not current then - return nil - end - if fs.is_directory(current) then - if not isIgnored(current) then - for path in current:list_directory() do - result[#result+1] = path - end - end - end - return current - end -end |