Checking effective permissions with boost::filesystem / std::filesystem

702 Views Asked by At

So, boost::filesystem lets you access a file's permissions in the sense of which permissions the owner has, which permissions the group has and which all users have. That's nice, but I don't want to start checking who I am, what my group is etc - I just want to check if I can, say, recurse some directory or not (and not by trying to do so and failing). How should I do that?

1

There are 1 best solutions below

0
AndiDog On

Not sure if boost::filesystem has that feature, but POSIX has access(2).