|
Boost : |
Subject: Re: [boost] Boost::Filesystem
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-06-16 19:27:05
On 16 Jun 2015 at 16:23, Amit Kumar wrote:
> Is there any functionality in boost::filesystem to identify local drives on
> Linux box.
> I want something similar to windows API *GetDriveType*().
Your post belongs in boost-users, not boost-dev, and even then Stack
Overflow is more appropriate.
I don't believe Filesystem has such an API. Proposed Boost.AFIO has
the statfs() call, but a completely portable solution that isn't
broken in some way is tough. After all, what is a local drive really?
On Linux I'd ask /sys/block as a beginning and go from there. Note
that POSIX, and Linux, has no concept of a local drive, especially as
you can stitch together multiple physical volumes into virtual
volumes using lvm2 etc.
Niall
-- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk