Boost logo

Boost Users :

Subject: [Boost-users] [boost::filesystem] How to determine access mode?
From: Dmitry V. Krivenok (krivenok_at_[hidden])
Date: 2009-02-19 09:59:12


Hello!

Is there a way to determine access mode for arbitrary file using
boost::filesystem?
I searched through the documentation and source code, but didn't find
such functions
in boost::filesystem.

I'm looking for simple functions like:
bool is_readable(const std::string& path)
bool is_writable(const std::string& path)
bool is_executable(const std::string& path)

I also want to determine OS-dependent access rights flags (such as
setuid and setgid
in Unix). Is it possible with boost::filesystem?
I don't want to use low-level stat() function and check for S_ISUID and
S_ISGID.

Thank you beforehand!

-- 
Sincerely yours, Dmitry V. Krivenok
Orange System Co., Ltd.
Saint-Petersburg, Russia
work phone: +7 812 332-32-40
cellular phone: +7 921 576-70-91
e-mail: krivenok_at_[hidden]
web: http://www.orangesystem.ru
skype: krivenok_dmitry
jabber: krivenok_dmitry_at_[hidden]
icq: 242-526-443

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