diff options
Diffstat (limited to 'lua/nvim-lsp-installer/core/installer/context.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/core/installer/context.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/core/installer/context.lua b/lua/nvim-lsp-installer/core/installer/context.lua index ad956178..0b13859b 100644 --- a/lua/nvim-lsp-installer/core/installer/context.lua +++ b/lua/nvim-lsp-installer/core/installer/context.lua @@ -43,6 +43,13 @@ function ContextualFs:append_file(rel_path, contents) end ---@async +---@param rel_path string @The relative path from the current working directory to the file to write. +---@param contents string +function ContextualFs:write_file(rel_path, contents) + return fs.write_file(path.concat { self.cwd:get(), rel_path }, contents) +end + +---@async ---@param rel_path string @The relative path from the current working directory. function ContextualFs:file_exists(rel_path) return fs.file_exists(path.concat { self.cwd:get(), rel_path }) |
