Help appreciated. Couldn't find any mention of this in "the book" (k&r).
By calling the mkdir() function. That links to the manual page online. To get that page on your (Linux) machine, enter in a terminal:
$ man 2 mkdir
The '2' is important, and is called the manual page section number. Since you want help for the C function "mkdir", as opposed to the command-line command "mkdir", you need to specify the section as otherwise you will get the command by default.
Although not part of the standard library, most implementations do include mkdir():
#include <dir.h>
...
mkdir("directory");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With