diff options
author | dundargoc <gocdundar@gmail.com> | 2024-11-27 15:36:38 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2024-11-27 19:56:08 +0100 |
commit | 76dcc7029b200e1d85024d7ba4a34c602e730dbe (patch) | |
tree | 840fef7db7a5ea85b68d02914b8be4170925c5d3 /runtime/lua/vim | |
parent | 203e7a43d1f209168a3cdae1650a9ef01db9cd72 (diff) | |
download | rneovim-76dcc7029b200e1d85024d7ba4a34c602e730dbe.tar.gz rneovim-76dcc7029b200e1d85024d7ba4a34c602e730dbe.tar.bz2 rneovim-76dcc7029b200e1d85024d7ba4a34c602e730dbe.zip |
docs: add tag `vim.fs.exists()` and document suggested replacement
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r-- | runtime/lua/vim/fs.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/lua/vim/fs.lua b/runtime/lua/vim/fs.lua index d91eeaf02f..2f007d97c3 100644 --- a/runtime/lua/vim/fs.lua +++ b/runtime/lua/vim/fs.lua @@ -1,3 +1,15 @@ +--- @brief <pre>help +--- *vim.fs.exists()* +--- Use |uv.fs_stat()| to check a file's type, and whether it exists. +--- +--- Example: +--- +--- >lua +--- if vim.uv.fs_stat(file) then +--- vim.print("file exists") +--- end +--- < + local uv = vim.uv local M = {} |