The mkdirs() method that creates a directory with all given parent directories.
2. Method signature
- method does not take any parameter
- true - the directory was created, along with all necessary parent directories; false otherwise
- SecurityException - when we do not have access to the file or directory
3.1. Creating directory
aaa in parent directory
zzz in parent directory
ttt in existing directory
In this article, we presented
mkdirs() method that creates a directory in Java with all parent directories. Note that if this operation fails it may have succeeded in creating some of the necessary parent directories.