user13789832 wrote:More time than what?
I am able to see that mkdir() method of File API consumes more time in creating directories.
Can any one please suggest if there can be a efficient way of creating directory structure with depth specified as 5 and can be achieved within 1-2 millisecondsThere's no way to guarantee how long it will take. That depends entirely on your environment. If you're creating more than one deep, you might find you get better performance with mkdirs() to create A, B, and C and once, rather than calling mkdir("A"), then mkdir("A/B"), then mkdir("A/B/C").