Open mgroth0 opened 6 months ago
Since that library is not stable, you're better off doing a manual convert for now. I suspect once it does go stable it will be supported.
You could also use Okio's multiplatform file system. It is stable, but I wouldn't expect Clikt to take it as a dependency for built-in support. Example:
I don't generally have library-specific extensions since calling .convert { it.toWhatever }
seems easy enough. But since paths have some extra validation functionality like canBeFolder
, it might make sense to provide that once kotlinx-io is stable.
@JakeWharton I actually wasn't aware about okio
for native filesystem operations. I tried it and it is working really well. Thank you!
And @ajalt, you are right and that is exactly why I made this issue. Because the JVM API is more than just a conversion but also has fancy checks like canBeFolder
, it would seem beneficial to support than more evenly across platforms if possible.
Title says it all. Using something like kotlinx-io to support even a subset of the path features in native would be excellent