.config/nvim/lua/config/util.lua

changeset 1161
2543467f42da
parent 1157
a237720efee9
child 1166
34bf03fa07e4
--- a/.config/nvim/lua/config/util.lua
+++ b/.config/nvim/lua/config/util.lua
@@ -49,18 +49,4 @@ function M.last_modified_days(fname)
   return (os.time() - vim.fn.getftime(fname)) / 86400
 end
 
-function M.prune_files(path, days)
-  local sunset = os.time() - (days * 86400)
-  path = vim.fs.normalize(path)
-
-  if fn.getftype(path) == "" then return end
-
-  for fname, type in vim.fs.dir(path) do
-    local fpath = vim.fs.normalize(path .. "/" .. fname)
-    if type == "file" and fn.getftime(fpath) < sunset then
-      os.remove(fpath)
-    end
-  end
-end
-
 return M

mercurial