dirEntries removes entire branches of empty directories

Ali Çehreli acehreli at yahoo.com
Wed Nov 9 20:06:15 UTC 2022


On 11/9/22 11:05, Ali Çehreli wrote:

 > Can you think of a workaround to achieve that?

Me, me, me! :) I've learned about the Posix function 'nftw' (but I am 
using its sibling 'ftw').

It was pretty easy to use but there is a quality issue there: They 
failed to support a 'void*' context for the user! You can walk the tree 
but can't put the results into your local context! Boo!

I guess it was designed by someone who is happy with global variables. 
:) At least D makes it easy to guard access to module variables with 
'synchronized', shared, etc.

Ali



More information about the Digitalmars-d-learn mailing list