Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions lua/rest-nvim/utils/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ end
-- file_exists checks if the provided file exists and returns a boolean
-- @param file File to check
M.file_exists = function(file)
file = io.open(file, "rb")
if file then
file:close()
end
return file ~= nil
if vim.fn.filereadable(file) ~= 1 then return false end
return true
Comment thread
Yagua marked this conversation as resolved.
Outdated
end

-- read_file Reads all lines from a file and returns the content as a table
Expand Down