diff options
author | Steven Arcangeli <stevearc@stevearc.com> | 2023-12-26 15:14:42 +0000 |
---|---|---|
committer | Steven Arcangeli <stevearc@stevearc.com> | 2023-12-26 16:49:54 +0000 |
commit | 9245b616d1edb159775a0832c03324bf92884494 (patch) | |
tree | beb9aa2c5af4385d4579375a30e91114d480de5b /lua/conform/fs.lua | |
parent | f245cca8ad42c9d344b53a18c3fc1a3c6724c2d4 (diff) |
fix(injected): code block at end of markdown file
Diffstat (limited to 'lua/conform/fs.lua')
-rw-r--r-- | lua/conform/fs.lua | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/lua/conform/fs.lua b/lua/conform/fs.lua index c33a2dc..d303dbd 100644 --- a/lua/conform/fs.lua +++ b/lua/conform/fs.lua @@ -15,24 +15,4 @@ M.join = function(...) return table.concat({ ... }, M.sep) end ----@param filepath string ----@return boolean -M.exists = function(filepath) - local stat = uv.fs_stat(filepath) - return stat ~= nil and stat.type ~= nil -end - ----@param filepath string ----@return string? -M.read_file = function(filepath) - if not M.exists(filepath) then - return nil - end - local fd = assert(uv.fs_open(filepath, "r", 420)) -- 0644 - local stat = assert(uv.fs_fstat(fd)) - local content = uv.fs_read(fd, stat.size) - uv.fs_close(fd) - return content -end - return M |