Check out example codes for "java create file and parent directories". It will help you in understanding the concepts better.

Code Example 1

if(!Files.exists(Path.of([PATH])))
{
	File f = new File([PATH]);
	f.getParentFile().mkdirs();
}

Learn ReactJs, React Native from akashmittal.com