MCPcopy Create free account
hub / github.com/Garten/sourcecraft / guessSteamPath

Method guessSteamPath

src/main/Steam.java:44–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42 }
43
44 private static File guessSteamPath() {
45 if (Main.isUnix()) {
46 File potentialPath = new File(System.getProperty("user.home") + File.separator + STEAM_NAME_UNIX);
47 if (isSteamPath(potentialPath)) {
48 return potentialPath;
49 }
50 }
51 for (String first : POTENTIAL_STEAM_PATH_GRAND_PARENTS) {
52 for (String second : POTENTIAL_STEAM_PATH_PARENTS) {
53 File potentialPath = new File(first + File.separator + second + File.separator + STEAM_NAME);
54 if (isSteamPath(potentialPath)) {
55 return potentialPath;
56 }
57 }
58 }
59 return null;
60 }
61
62 public static boolean isSteamPath(File path) {
63 if (path == null) {

Callers 1

getSteamPathMethod · 0.95

Calls 2

isUnixMethod · 0.95
isSteamPathMethod · 0.95

Tested by

no test coverage detected