Skip to content

Commit 666ddeb

Browse files
committed
chore(#3196): remove unused utils.read_file
1 parent fefa335 commit 666ddeb

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

lua/nvim-tree/utils.lua

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,6 @@ function M.str_find(haystack, needle)
1717
return vim.fn.stridx(haystack, needle) ~= -1
1818
end
1919

20-
---@param path string
21-
---@return string|uv.uv_fs_t
22-
function M.read_file(path)
23-
local fd = vim.loop.fs_open(path, "r", 438)
24-
if not fd then
25-
return ""
26-
end
27-
local stat = vim.loop.fs_fstat(fd)
28-
if not stat then
29-
return ""
30-
end
31-
local data = vim.loop.fs_read(fd, stat.size, 0)
32-
vim.loop.fs_close(fd)
33-
return data or ""
34-
end
35-
3620
local path_separator = package.config:sub(1, 1)
3721
---@param paths string[]
3822
---@return string

0 commit comments

Comments
 (0)