Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a directory in "user.home"?

How would you create a directory inside the user's home?

I know how to create a normal directory, but how do you set a path for it with user.home?

like image 961
Amundeep Singh Avatar asked Dec 16 '22 05:12

Amundeep Singh


1 Answers

boolean success = new java.io.File(System.getProperty("user.home"), "directory_name").mkdirs();
like image 153
Synesso Avatar answered Jan 05 '23 10:01

Synesso