title: How do I create directories and files within the user's AppData directory?
body: <p>So, I'm creating a game and need to create directories to store all the user's data and saves and whatnot. As you can see, I need to create a folder in the Application Data folder of the user called, "[WarDungeon]", and there, I will store other folders for such data like levels, the bin, sprites, etc.</p>
  
  <p>I am not too interested in working with Mac OS and Linux as I want to get the %appdata% folder working with Windows to begin with.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>public FileManage() {
      gamePath  = System.getenv("APPDATA") + "[WarDungeon]";
      gameLevelPath  = System.getProperty("user.home") + "\\Local Settings\\ApplicationData\\[WarDungeon]\\level";
      gameBinPath  = System.getProperty("user.home") + "\\Local Settings\\ApplicationData\\[WarDungeon]\\bin";
  
      File createDir1 = new File(gamePath);
      createDir1.mkdir();
  
      System.out.println("First test passed.");
  
      if (createDir1.exists() == true) {
          System.out.println("First directory created!");
      }
  }
  </code></pre>
  
  <p>How do I fix this?</p>
  
  <p>Thanks in advance, :)</p>