Boost logo

Boost :

From: Martin Wille (mw8329_at_[hidden])
Date: 2004-02-03 15:34:40


Beman Dawes wrote:
> At 05:20 PM 2/2/2004, Walter Landry wrote:
> >Beman Dawes <bdawes_at_[hidden]> wrote:
> >> How should size( "foo" ) behave if "foo" is a directory?
> >
> >What about symlinks?
>
> Good question. The POSIX implementation just committed uses stat(). My
> inclination is that this is desirable, but I'm not a POSIX user so I
> could easily be wrong.
>
> Opinions?

The implementation should return the size of the file that
would be opened if the pathname of the symlink is used for
opening, ie. it should return the size of the file being
referred to by the symlink. So, IMHO, the implementation
is correct and using lstat would be wrong.

Regards,
m


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk