On 7/05/2020 03:45, Dominique Devienne wrote:
Hi. I'm not having any luck with finding out whether a folder is writable or not, on Windows. Is Boost.Filesystem (1.64) supposed to work on Windows for permissions? Especially in "special" folders like those in "C:\Program Files"?
C:\Program Files\Vendor\App>echo foo > bar Access is denied.
But Boost.Filesystem reports permissions as rw-rw-rw-, when printing them using the BFS-equivalent to the example available on CppReference https://en.cppreference.com/w/cpp/filesystem/perms
Despite obviously the folder not being writable, w/o being an administrator.
IIRC, it only looks at the basic file attributes (in this case, the "read only" checkbox), and doesn't check the ACL at all. I think it ignores ACLs on Unixen similarly (albeit they're less commonly used over there).