Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2003-11-24 13:47:34

Peter Dimov wrote:

>Beman Dawes wrote:
>> At 05:53 PM 11/21/2003, Peter Dimov wrote:
>[about reference counted links]
>>> It doesn't make sense to talk about shallow or deep semantics here.
>> That's usually correct, but there are a few query operations where the
>> shallow/deep issue might matter, depending on the operating system.
>> Size/date/time being examples.
>Do you have a specific OS in mind? Size is a particularly interesting
>example. ;-)

No, except that size is problematic on many file systems, so it wouldn't
surprise me at all if size for a reference counted link is sometimes

That being said, Boost.Filesystem could support a create_link() function
based on POSIX link() and Windows CreateHardLink(). While it would be
portable between POSIX and Windows for files, for directories it would
always fail on Windows, and might fail on POSIX (because the functionality
is optional for POSIX directories.

I'm somewhat worried about providing a function with so many caveats. Also,
no one has asked for it.

>From C++ point of view it is reasonable to consider a symlink something
>that when passed to std::fopen actually opens another file. Under this
>definition .lnk does not appear to be a symlink.

Yes, that's what I've been thinking. So I don't think Boost.Filesystem
should provide a function to create symlinks; it would be too non-portable.

OTOH, providing an is_symbolic_link() function which always returns false
on Windows would allow users to write correct portable directory recursion
programs similar to remove_all.


Boost list run by bdawes at, gregod at, cpdaniel at, john at