Boost::Filesystem
Hi All Is there any functionality in boost::filesystem to identify local drives on Linux box. I want something similar to windows API *GetDriveType*(). Regards Amit
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/
participants (2)
-
Amit Kumar
-
Niall Douglas