-(defun ztree-diff-model-create (dir1 dir2)
- "Create a node based on DIR1 and DIR2."
- (when (not (file-directory-p dir1))
+(defun ztree-diff-model-create (dir1 dir2 &optional ignore-p)
+ "Create a node based on DIR1 and DIR2.
+IGNORE-P is the optional filtering function, taking node as
+an argument, which determines if the node should be excluded
+from comparison."
+ (unless (file-directory-p dir1)