Does Windows have an equivalent to Linux/FreeBSD's `RESOLVE_BENEATH` and `O_RESOLVE_BENEATH`?

Viewed 59

I want to open a file, while ensuring that no component of the path goes outside a certain directory.

On Linux, I can accomplish this using openat2 and RESOLVE_BENEATH, and on FreeBSD there is the O_RESOLVE_BENEATH flag with openat.

Is there any way to achieve the same effect on Windows? Note that this needs to be on a per-call basis — globally restricting my process to a given directory is not useful.

0 Answers
Related