Wouldn't it be nice if package kotlin.io.path was ...
# stdlib
k
Wouldn't it be nice if package kotlin.io.path was included in the list of default imports? It includes many functions that are preferable to those with the same names in the kotlin.io package. One consequence of it not being included is that, for example, if you start writing "createT", IntelliJ IDEA offers to complete it to "createTempFile" from kotlin.io which is deprecated in favour of kotlin.io.path.createTempFile due to security concerns. But you won't even see the option to choose the latter in the list of suggested completions.
👎 2
👍 2
s
that sounds more like an IJ bug/enhancement than a change in the language/stdlib
n
This list of default imports is part of the language, and I agree that - given that koltin.io.* is part of that list - adding kotlin.io.path.* makes sense to me.
j
An official io (finished) library with default imports should be great, when scripting without IDE autocompletion it is annoying to add java imports and so on, which is pretty usual using files in scripts