MCPcopy Create free account
hub / github.com/Neop/mudmap2 / getUserDataDir

Method getUserDataDir

src/main/java/mudmap2/Environment.java:56–68  ·  view source on GitHub ↗

Gets the user data path @return user data path

()

Source from the content-addressed store, hash-verified

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

Callers 2

getWorldsDirMethod · 0.95
getHistoryFileMethod · 0.95

Calls 3

isEmptyMethod · 0.65
containsMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected