Fyodor Danilov
12/18/2023, 8:31 AMJhaman das
12/18/2023, 8:46 AMAndroid
, iOS
, Web
??Fyodor Danilov
12/18/2023, 8:46 AMLinux
or Windows
Jhaman das
12/18/2023, 8:50 AMOS
details. I am not web developer guy might you could find something on stackoverflow
.
https://stackoverflow.com/questions/9514179/how-to-find-the-operating-system-details-using-javascriptFyodor Danilov
12/18/2023, 8:51 AMhallvard
12/18/2023, 9:30 AMSystem.getProperty("os.name")
?krzysztof
12/18/2023, 10:10 AMI want to create a database file that will be stored in different places depending if the machine runs Windows or Linux.sounds like expect/actual case?
hallvard
12/18/2023, 10:12 AMkrzysztof
12/18/2023, 10:14 AMcommon:
expect fun getDbPath(): String
macos:
expect fun getDbPath(): String
mingw:
expect fun getDbPath(): String
linux:
expect fun getDbPath(): String
hallvard
12/18/2023, 10:17 AMfun getDbPath(os: String) = if os.contains("linux") "linux-path" else "windows-path"
krzysztof
12/18/2023, 10:58 AMchr
12/18/2023, 4:32 PMSystemUtils
has several utilities for this:
• IS_OS_WINDOWS
• IS_OS_LINUX
• …etcHenri Gourvest
12/21/2023, 10:15 AMprivate val isWindows = (FileSystems.getDefault().separator == "\\")