Boost logo

Boost :

From: Jan Langer (jan_at_[hidden])
Date: 2002-03-06 09:54:54


On Wed, 6 Mar 2002, Stewart, Robert wrote:
>You can't assume which directory makes sense for root_directory(). If a PC
>is booted from a floppy, then "A:\" may be correct. If a system is
>configured to do its initial boot from one device and then switches to
>another, then the root directory of some other drive is the correct value
>for root_directory() to return. Consequently, I think that this concept
>must be handled separately.
>
>What I mean is that on a drive letter-based filesystem, one must determine
>the correct drive letter by some extra-library or otherwise
>filesystem-dependent means. Once you have the correct drive letter, perhaps
>including the : and \, then the rest of the library under discussion comes
>to bear.

yes, these problems can be solved "by some extra-library or otherwise
filesystem-dependent means". IMO a hierarchy_iterator.

>> if i call erase (*directory_iterator (root_directory ())) i
>> expect that
>> on posix it tries to delete /bin and on windows
>> a:/firstfileonfloppy.txt. this behaviour can be achieved by a
>> hierarchy_iterator in a much clearer way.
>
>I would never want the library to do the kind of magic I think you're
>suggesting here. If I want to delete a:\firstfileonfloppy.txt, then I want
>to be the one to create that pathname...explicitly.

i don't understand you here. you want no directory_iterators?

-- 
jan langer ... jan_at_[hidden]
"pi ist genau drei"

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