Boost logo

Boost Users :

Subject: Re: [Boost-users] list all drives
From: Michael Jackson (mike.jackson_at_[hidden])
Date: 2010-07-12 12:03:00


On 7/12/10 11:31 AM, in article
967563BA-7178-42E5-8388-340DF5B26B58_at_[hidden], "Marshall Clow" wrote:

> On Jul 12, 2010, at 8:21 AM, Michael Jackson wrote:
>
>> On 7/11/10 6:50 PM, in article
>> AANLkTilxjfmegCAHrXnOKOPLPcDMXXabMgCLA9_FXH36_at_[hidden], "Daniel
>> Trebbien" wrote:
>>
>>>> Hi,
>>>>
>>>> I am programming on a widows system. Is it possible to list all drives
>>>> available in a system with boost::filesystem library or any other boost
>>>> library?
>>>>
>>>> I have gone through boost::filesystem documentation, but could not find any
>>>> :(
>>>>
>>>> Thanks a lot,
>>>> Lloyd
>>>
>>> Hi Lloyd,
>>>
>>> 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.
>>>
>>> To obtain a list of drives, you should instead use the Windows API
>>> function `GetLogicalDriveStrings`:
>>> http://msdn.microsoft.com/en-us/library/aa364975.aspx
>>>
>>> Daniel
>>
>> Doesn't OS X have the concept of separate Drives? They are all just mounted
>> in /Volumes
>
> Exactly.
> Mac OS X (like other unix-es) has a single-rooted file system; everything is
> under "/". (i.e, you can get to every file on the computer by starting at '/'
> and traversing the directory tree)
>
> Windows (AFAIK) does not - all the devices/drives are separate.
>
> -- Marshall

Wouldn't "My Computer" on windows machines be analgous to the /Volumes on OS
X? Therefor all drives are rooted at "My Computer"?

Just a thought.
Mike Jackson


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net