On Jul 11, 2010, at 11:34 PM, Scott McMurray wrote:
On 11 July 2010 15:50, Daniel Trebbien
wrote: Because the concept of drives is unique to Windows, Boost Filesystem does not implement such a function. Boost Filesystem and all Boost libraries are designed to be cross-platform.
Boost Filesystem paths do have the concept of a "root name", though, so it might be logical to have a function that lists them.
Yes, that's how Java handles this problem. Like Boost, it has a cross- platform I/O library, and so it too must deal with the Windows-only concept of 26 lettered drives. Its solution is a function that returns an array of "roots": http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/io/File....) On my Ubuntu desktop, the array is {"/"}, while on my Windows desktop, it's {"A:\", "C:\", "D:\"}. Perhaps Boost can adopt a similar approach. Trevor