Subject: Re: [boost] [filesystem] Should recursive_directory_iterator follow directory symlinks by default?
From: Jeremy Maitin-Shepard (jeremy_at_[hidden])
Date: 2011-02-09 12:37:13
On 02/09/2011 08:43 AM, Stewart, Robert wrote:
> Beman Dawes wrote:
>> recursive_directory_iterator currently always follows
>> directory symlinks
>> It seems to me that whether or not this behavior is desirable is
>> application dependent.
>> Thus I'd like to add an option to either following directory symlinks
>> or not. Which should the default be?
> *nix follows symlinks by default. One must use special APIs to recognize and inspect symlinks. I should think consistency across platforms would be good.
That isn't really true. There isn't any POSIX function for recursive
directory walking. It is simply a matter of whether lstat or stat is
used to check whether directory entries are themselves directories. As
one example, GNU find does not follow symlinks by default.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk