def getWorkingDirectory(cls, appName): """ generated source for method getWorkingDirectory """ s = os.path.sep userHome = System.getProperty("user.home", ".") dir_ = File() if OS.isLinux(): dir_ = File(userHome, s + appName) elif OS.isSolaris(): dir_ = File(userHome + s + appName) elif OS.isWindows(): if applicationData != None: dir_ = File(applicationData + s + appName) else: dir_ = File(userHome + s + appName) elif OS.isMac(): dir_ = File(userHome, "Library" + s + "Application Support" + s + appName) else: dir_ = File(".") if not dir.exists() and not dir.mkdirs(): dir_ = File(System.getProperty("java.io.tmpdir")) dir_ = File(dir.getAbsoluteFile() + ("" if dir.getAbsolutePath().endsWith(s) else s) + appName) if not dir.exists(): dir.mkdirs() return dir.getAbsolutePath()