Heyo,
I'm coming from VB.Net, so I'm pretty spoiled when it comes to accessing the Windows OS and shiz like that.
Now, I'd like to create a settings file for my program which will be saved in the user's documents directory (C:\Users\XXYY\My Documents\MyProgram\MySettingsFile.file).
In VB, I'd do something like this:
Private docs As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
If Not File.Exists(docs & "\My Program\MySettingsFile.file") Then
File.Create(docs & "\My Program\MySettingsFile.file")
Return FileExists
Else
Return FileDoesntExist
End If
How would I achieve such a thing in Java? I don't necessarily mean the FileIO bit, that's rather easy, but I meant the documents thing. I know it's possible from playing Minecraft, which saves its files in the AppData\Roaming part of the Windows profile.
Any help is much appreciated!
Thanks in advance.