[code] [textadept] lfs.dir_foreach and symlinks

From: Chris Emerson <c-ta.att.mail.nosreme.org>
Date: Thu, 9 Apr 2015 13:45:40 +0100


I want to do something like lfs.dir_foreach, but with the option to somehow
skip symlinked directories. As far as I can see, there's no good way to do
that at the moment.

The closest is returning false from the provided function (which would call
lfs.symlinkattributes)- but that skips the rest of the entries in the same
directory as the symlink rather than just skipping that item (incidentally,
I'm not sure that's exactly what I expected from the documentatin).

My problem would be solved by allowing the function to return some other
value (eg "skip") which meant "don't recurse into this directory, but
continue"; or some extension to the filter table to let me do something
similar (maybe cleaner).

Have I missed a better solution?



You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Thu 09 Apr 2015 - 08:45:40 EDT

This archive was generated by hypermail 2.2.0 : Fri 10 Apr 2015 - 06:26:42 EDT