Creating a Directory

// Create a directory; all ancestor directories must exist boolean success = (new File("directoryName")).mkdir(); if (!success) { // Directory creation failed } // Create a directory; all non-existent ancestor directories are // automatically created success = (new File("directoryName")).mkdirs(); if (!success) { // Directory creation failed }

Post a comment

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image. Ignore spaces and be careful about upper and lower case.