Re: [code] [textadept] lfs.dir_foreach and symlinks

From: Mitchell <>
Date: Thu, 9 Apr 2015 12:41:46 -0400 (EDT)

Hi Chris,

On Thu, 9 Apr 2015, Chris Emerson wrote:

> Hi,
> 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?

No, you outlined pretty much what needs to be done. I'll think on this and
let you know what I come up with.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Thu 09 Apr 2015 - 12:41:46 EDT

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