I’m writing a Kotlin/Native application targeted for Windows, Linux and Mac and I need to call platform.posix._popen
on Windows and platform.posix.popen
on the other.
If I use a simple conditional (if (Platform.osFamily == OsFamily.WINDOWS)
), I get a compile error.
New contributor
Rodrigo Carvalho Silva is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.