Haven't really been following the conversation so if this is already there ignore me, but...
... or, a regexp pattern of files/directories to ignore/include.
Kevin
On Mon, Nov 14, 2011 at 12:03 PM, Johannes.Lichtenberger Johannes.Lichtenberger@uni-konstanz.de wrote:
On 11/14/2011 08:17 PM, Alexander Holupirek wrote:
If you also want to have the extractor functionality ... we thought
about packaging [2] it for BaseX and make it available as XQuery functions. Just give us a hint and we will get going.
Hi Alex,
BTW: I would maybe provide a switch or something to disable the traversal of hidden files (for instance .svn folders :-)). For my own requirenments it seems to be sufficient to ignore hidden files at all. Hopefully my little changes are sufficient ;-)
dents = os.listdir(dpath) if depth != 0: if not dents: visit_empty_directory(dpath, depth) return if not dents[0].startswith('.'): visit_enter_directory(dpath, depth) for file_ in dents: if not file_.startswith('.'): path = os.path.join(dpath, file_) if os.path.islink(path): visit_link(path, depth + 1) elif os.path.isdir(path): descend(path, depth + 1, xdcr_map) else: visit_file(path, depth + 1, xdcr_map) if depth != 0: if not dents[0].startswith('.'): visit_leave_directory(depth)
kind regards, Johannes
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk