@@ -3,7 +3,7 @@ local api = vim.api
3
3
local lsp = vim .lsp
4
4
local nvim_eleven = vim .fn .has ' nvim-0.11' == 1
5
5
6
- local iswin = vim .loop .os_uname ().version :match ' Windows'
6
+ local iswin = vim .uv .os_uname ().version :match ' Windows'
7
7
8
8
local M = { path = {} }
9
9
@@ -103,7 +103,7 @@ function M.root_pattern(...)
103
103
for _ , pattern in ipairs (patterns ) do
104
104
local match = M .search_ancestors (startpath , function (path )
105
105
for _ , p in ipairs (vim .fn .glob (table.concat ({ escape_wildcards (path ), pattern }, ' /' ), true , true )) do
106
- if vim .loop .fs_stat (p ) then
106
+ if vim .uv .fs_stat (p ) then
107
107
return path
108
108
end
109
109
end
194
194
195
195
-- Traverse the path calling cb along the way.
196
196
local function traverse_parents (path , cb )
197
- path = vim .loop .fs_realpath (path )
197
+ path = vim .uv .fs_realpath (path )
198
198
local dir = path
199
199
-- Just in case our algo is buggy, don't infinite loop.
200
200
for _ = 1 , 100 do
@@ -245,11 +245,11 @@ function M.path.is_dir(filename)
245
245
return vim .fn .isdirectory (filename ) == 1
246
246
end
247
247
248
- --- @deprecated use `(vim.loop .fs_stat(path) or {}).type == 'file'` instead
248
+ --- @deprecated use `(vim.uv .fs_stat(path) or {}).type == 'file'` instead
249
249
--- @param path string
250
250
--- @return boolean
251
251
function M .path .is_file (path )
252
- return (vim .loop .fs_stat (path ) or {}).type == ' file'
252
+ return (vim .uv .fs_stat (path ) or {}).type == ' file'
253
253
end
254
254
255
255
--- @deprecated use `vim.fs.dirname` instead
@@ -258,11 +258,11 @@ M.path.dirname = vim.fs.dirname
258
258
--- @deprecated use `vim.fs.normalize` instead
259
259
M .path .sanitize = vim .fs .normalize
260
260
261
- --- @deprecated use `vim.loop .fs_stat` instead
261
+ --- @deprecated use `vim.uv .fs_stat` instead
262
262
--- @param filename string
263
263
--- @return string | false
264
264
function M .path .exists (filename )
265
- local stat = vim .loop .fs_stat (filename )
265
+ local stat = vim .uv .fs_stat (filename )
266
266
return stat and stat .type or false
267
267
end
268
268
0 commit comments