macOS 11 and later's openat supports an O_NOFOLLOW_ANY flag which causes resolution to fail if any path component contains a symlink. We can use this to implement a fast-path for os.Root operations in the common case when the path does not contain a symlink.
macOS 11 and later's
openatsupports an O_NOFOLLOW_ANY flag which causes resolution to fail if any path component contains a symlink. We can use this to implement a fast-path foros.Rootoperations in the common case when the path does not contain a symlink.