Integer wrap around semantics GNU [file system compat library]

Why do I even look at make_directory_path/2, the source
in SWI-Prolog? Well it could be a thingy for the other direction.
Not a flow from predicate ideas from GNU to SWI, but vice

versa from SWI to GNU. Namely deliver a SWI-Prolog compatiblity
library for inside GNU Prolog. As of this writing it seems GNU Prolog
doesn’t have any make_directory_path/2 predicate.

Neither do my Prolog systems have such a predicate. But it
could have some use case. I also like the suggestion by brebs:

If you give a parent directory, you could also give this
parent directory to a make_directory_path/2 not only to a
make_directory/2. It would say when to stop. For example

I wonder if mkdir -p, when issue as follows with a relative
path instead of an absolute path, tries to ensure the current directory?

# mkdir -p foo/bar

A fast implementation of mkdir would stop at the current working
directory, this is anyway assumed to exist? A left recursive implementation
as done in SWI-Prolog does not stop at the current working directory.