What would be the proper way to call an objective ...
# kotlin-native
s
What would be the proper way to call an objective c function that takes a pointer to a boolean? i.e. https://developer.apple.com/documentation/foundation/nsfilemanager/1410277-fileexistsatpath
r
Something like this
Copy code
memScoped {
    val isDirectory = alloc<BooleanVar>()
    NSFileManager().fileExistsAtPath("some/path", isDirectory.ptr)
    val output = isDirectory.value
    // do something with output
}
s
Thanks 🙂 That seems to work.