
3 Feb
2004
3 Feb
'04
8:34 p.m.
Beman Dawes wrote:
At 05:20 PM 2/2/2004, Walter Landry wrote:
Beman Dawes <bdawes@acm.org> 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