I would like to check, if a file is read only or writeable, possibly without actually opening it, using the new std::filesystem
api.
I was able to find a documentation about permissions with an example code about how to query a specific file's owner/group/others read/write/exetuce permissions.
How is it possible to find out the read permission for the user that is running the program?
An other process could lock the file as well, which may also make it not writeable.
There is a similar question, but the answer uses a C api, which I would like to avoid.