How do you handle a non existing localDirectory in...
# dokka
h
How do you handle a non existing localDirectory inside sourceLinks?, eg
Copy code
`
sourceLink {
    localDirectory by file("src/$sourceSetName/kotlin") // there is no watchosSimulatorArm64 because all sources are in commonMain...
    remoteUrl by uri("<https://github.com/hfhbd/RateLimit/tree/main/src/$sourceSetName/kotlin>").toURL()
    remoteLineSuffix by "#L"
}
Workaround:
Copy code
File("src/$sourceSetName/kotlin").takeIf { it.exists() }?.let {
  sourceLink {
    localDirectory by it
    remoteUrl by uri("<https://github.com/hfhbd/RateLimit/tree/main/src/$sourceSetName/kotlin>").toURL()
    remoteLineSuffix by "#L"
  }
}
­čĹŹ 1