
Enhances file handling by extending an existing I/O library, enabling path conversions between file system paths and URIs, supporting UNC paths and IPv6 addresses.
= okio-extras :toc:
[.left] image::https://img.shields.io/badge/License-MIT-yellow.svg[License: MIT,link="https://opensource.org/licenses/MIT"]
A set of extensions to https://square.github.io/okio/[_Okio_].
See the https://saveourtool.github.io/okio-extras[project website] for documentation and APIs.
== Features
Among other useful multiplatform extensions, which are modelled after kotlin.io
API available on the JVM, the library provides a way to convert a file system
path to a file:// URI and vice versa:
// Will print "file:/C:/Windows/" println("C:\Windows".toPath().toFileUri())
UNC paths are supported on Windows:
// Will print "\127.0.0.1\C$\Windows" println(Uri("file:////127.0.0.1/C$/Windows").toLocalPath().pathString)
IPv6 addresses are parsed correctly:
== Releases
The latest release is available from GitHub Packages.
For build.gradle.kts:
For settings.gradle.kts:
Then add the dependency as usual:
= okio-extras :toc:
[.left] image::https://img.shields.io/badge/License-MIT-yellow.svg[License: MIT,link="https://opensource.org/licenses/MIT"]
A set of extensions to https://square.github.io/okio/[_Okio_].
See the https://saveourtool.github.io/okio-extras[project website] for documentation and APIs.
== Features
Among other useful multiplatform extensions, which are modelled after kotlin.io
API available on the JVM, the library provides a way to convert a file system
path to a file:// URI and vice versa:
// Will print "file:/C:/Windows/" println("C:\Windows".toPath().toFileUri())
UNC paths are supported on Windows:
// Will print "\127.0.0.1\C$\Windows" println(Uri("file:////127.0.0.1/C$/Windows").toLocalPath().pathString)
IPv6 addresses are parsed correctly:
== Releases
The latest release is available from GitHub Packages.
For build.gradle.kts:
For settings.gradle.kts:
Then add the dependency as usual: