docs: abstract away directory scan
authorDaniel Kolesa <d.kolesa@osg.samsung.com>
Mon, 15 Aug 2016 12:50:32 +0000 (13:50 +0100)
committerDaniel Kolesa <d.kolesa@osg.samsung.com>
Mon, 15 Aug 2016 12:50:32 +0000 (13:50 +0100)
src/scripts/elua/apps/docgen/doctree.lua
src/scripts/elua/apps/gendoc.lua

index f794669..3c1967d 100644 (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
index 0cffab2..0329351 100644 (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