Gets the user data path @return user data path
()
| 54 | * @return user data path |
| 55 | */ |
| 56 | public static String getUserDataDir(){ |
| 57 | if(userDataDir == null || userDataDir.isEmpty()){ |
| 58 | // read the user data path from environment variables |
| 59 | if(System.getProperty("os.name").toLowerCase().contains("win")){ |
| 60 | // operating system Windows |
| 61 | userDataDir = System.getenv().get("APPDATA") + File.separator + "mudmap" + File.separator; |
| 62 | } else { |
| 63 | // other operating systems |
| 64 | userDataDir = System.getProperty("user.home") + File.separator + ".mudmap" + File.separator; |
| 65 | } |
| 66 | } |
| 67 | return userDataDir; |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * Changes the user data dir for debugging purposes |
no test coverage detected