nvim.nix/nvim/lua/user/file_exists.lua

9 lines
150 B
Lua
Raw Permalink Normal View History

2024-03-06 23:07:22 +01:00
local F = {}
function F.file_exists(name)
local f=io.open(name,"r")
if f~=nil then io.close(f) return true else return false end
end
return F