code: function(treeRoot) {
        var stat = fs.statSync(treeRoot);
        if (stat.isDirectory()) {
          return buildTree(treeRoot);
        } else {
          throw new Error("path: " + treeRoot + " is not a directory");
        }
      }
docs: Crawl the given directory and build the tree object model for further use