docs: abstract away directory scan

This commit is contained in:
Daniel Kolesa 2016-08-15 13:50:32 +01:00
parent c17ee4027a
commit e9ddce647c
2 changed files with 9 additions and 2 deletions

View File

@ -426,4 +426,11 @@ M.Event = Node:clone {
end
}
M.scan_directory = function(dir)
if not dir then
return eolian.system_directory_scan()
end
return eolian.directory_scan(dir)
end
return M

View File

@ -1092,12 +1092,12 @@ getopt.parse {
dr = dutil.path_join(dr, dutil.nspace_to_path(rootns))
dutil.init(dr)
if #args == 0 then
if not eolian.system_directory_scan() then
if not dtree.scan_directory() then
error("failed scanning system directory")
end
else
for i, p in ipairs(args) do
if not eolian.directory_scan(p) then
if not dtree.scan_directory(p) then
error("failed scanning directory: " .. p)
end
end