createDir dir creates a new directory dir which is initially
empty, or as near to empty as the operating system allows.
The operation may fail with:
isPermissionError/PermissionDeniedThe process has insufficient privileges to perform the operation.[EROFS, EACCES]isAlreadyExistsError/AlreadyExistsThe operand refers to a directory that already exists.[EEXIST]HardwareFaultA physical I/O error has occurred.[EIO]InvalidArgumentThe operand is not a valid directory name.[ENAMETOOLONG, ELOOP]NoSuchThingThere is no path to the directory.[ENOENT, ENOTDIR]ResourceExhaustedInsufficient resources (virtual memory, process file descriptors, physical disk space, etc.) are available to perform the operation.[EDQUOT, ENOSPC, ENOMEM, EMLINK]InappropriateTypeThe path refers to an existing non-directory object.[EEXIST]