How to create a directory and sub directory structure with java?

后端 未结 5 1424
忘了有多久
忘了有多久 2020-12-29 05:39

Hello there I want to create the directories and sub directories with the java. My directory structure is starts from the current application directory, Means in current pro

5条回答
  •  暖寄归人
    2020-12-29 06:39

    You can just use file.mkdirs(), it will create sub-directory.

    String path = images + File.separator + Background + File.separator + Foreground + File.separator + Necklace + File.separator  + Earrings ;
    File file = new File( path );
    file.mkdirs();
    

提交回复
热议问题