Added config.ignore_files

Filenames that match either the single pattern provided by
`config.ignore_files`, or any pattern in a table of patterns, will be ignored
when lite is filling the `core.project_files` table

Resolves #77
Resolves #102
This commit is contained in:
rxi
2020-05-17 13:38:45 +01:00
parent 1abb979490
commit 4644154e5b
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
require "core.strict"
local common = require "core.common"
local config = require "core.config"
local style = require "core.style"
local command
@@ -34,7 +35,7 @@ local function project_scan_thread()
local dirs, files = {}, {}
for _, file in ipairs(all) do
if not file:find("^%.") then
if not common.match_pattern(file, config.ignore_files) then
local file = path .. PATHSEP .. file
local info = system.get_file_info(file)
if info and info.size < size_limit then