vsm :: FileIndex :: accept_file
path
accepted depending on whitelist_exts
and blacklist_exts
?
# Is `path` accepted depending on `whitelist_exts` and `blacklist_exts`?
fun accept_file(path: String): Bool do
var ext = path.file_extension
if ext != null then
ext = ext.to_lower
if blacklist_exts.has(ext) then return false
if whitelist_exts.not_empty and not whitelist_exts.has(ext) then return false
end
return whitelist_exts.is_empty
end
lib/vsm/vsm.nit:305,2--314,4