Added support to use a array of regex to ignore files
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
local config = require 'core.config'
|
||||
|
||||
local common = {}
|
||||
|
||||
|
||||
@@ -445,4 +447,15 @@ function common.rm(path, recursively)
|
||||
return true
|
||||
end
|
||||
|
||||
---@param filename string
|
||||
---@return boolean
|
||||
function common.match_ignore_files(filename)
|
||||
for _, pattern in ipairs(config.ignore_files) do
|
||||
if common.match_pattern(filename, pattern) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
return common
|
||||
|
||||
Reference in New Issue
Block a user