From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-03-16 20:05:17
"Jeremy Maitin-Shepard" <jbms_at_[hidden]> wrote in message
> Making it handle symbolic links properly is certainly not trivial,
> cannot be done efficiently with the current version of the
> library (assuming no additional platform-specific code is added).
> As has been discussed already in relation to the implementation of
> `equivalent' function which Beman is adding, the common
> is to store the inode numbers of every directory with a link count
> greater than one in a hash set, and then make sure that they are
> traversed only once. This implementation is not perfect, however,
> because most platforms, including Windows and Linux, do not
> that inode numbers are unique for files for which there is not an
> handle. Thus, the way to remedy this would be to keep an open
> each directory whose inode number is being stored; but this creates
> problem of the traversal being limited by the number of open file
> handles/descriptors a single process can have.
I understand the reluctance to add a feature which raises such thorny
issues. However, I think the fact that recursive directory iteration
is hard to implement properly is an excellent reason to put it in a
library. I would imagine that a lot of existing code doesn't handle
all these issues correctly. Limitations of the implementation can be
explained in the documentation.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk