Skip to content

Commit 359c260

Browse files
committed
chore: remove deprecated scandir
1 parent 7933ae1 commit 359c260

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

lua/lazy/core/util.lua

-17
Original file line numberDiff line numberDiff line change
@@ -107,23 +107,6 @@ function M.very_lazy()
107107
end
108108

109109
---@alias FileType "file"|"directory"|"link"
110-
---@alias DirEntry {name: string, path: string, type: FileType}[]
111-
---@param path string
112-
---@param fn fun(path: string, name:string, type:FileType)
113-
function M.scandir(path, fn)
114-
local dir = vim.loop.fs_opendir(path, nil, 100)
115-
if dir then
116-
local entries = vim.loop.fs_readdir(dir) --[[@as DirEntry[]]
117-
while entries do
118-
for _, entry in ipairs(entries) do
119-
entry.path = path .. "/" .. entry.name
120-
fn(path .. "/" .. entry.name, entry.name, entry.type)
121-
end
122-
entries = vim.loop.fs_readdir(dir)
123-
end
124-
vim.loop.fs_closedir(dir)
125-
end
126-
end
127110
---@param path string
128111
---@param fn fun(path: string, name:string, type:FileType)
129112
function M.ls(path, fn)

0 commit comments

Comments
 (0)