So, I want to create a file in a folder on the desktop. But I don't want everyone who downloads the game to have to create that folder. Is there a way to do this? The did for the folder is:
/users/USER/desktop/MyFolder
So, I want to create a file in a folder on the desktop. But I don't want everyone who downloads the game to have to create that folder. Is there a way to do this? The did for the folder is:
/users/USER/desktop/MyFolder
I will direct you to the File Javadoc. It contains a few methods for creating new directories and files.
Example:
File file = new File("/users/USER/desktop/MyFolder");
if(!file.exists())
{
file.makeDirs();
}