okio v3.0.0-alpha.11 Release Notes

  • 2021-10-23

    • Upgrade: [Kotlin 1.5.31][kotlin_1_5_31].
    • Upgrade: [kotlinx-datetime 0.3.0][datetime_0_3_0]. (This is a dependency of okio-fakefilesystem only.)
    • New: Support creating and accessing symlinks. We were reluctant to include symlinks in our API (to keep it small!) but decided that supporting them was essential to properly implement recursive traversal.
    • New: FileMetadata.extras can track metadata for custom FileSystem implementations.
    • New: Support Apple Silicon Kotlin/Native targets (macosArm64, iosSimulatorArm64, tvosSimulatorArm64, and watchosSimulatorArm64).
    • New: FileSystem.listRecursively() returns a Sequence that includes all of a directory's children, and all of their children recursively. The implementation does a lazy, depth-first traversal.
    • New: Path.relativeTo() computes how to get from one path to another.
    • New: Path.root and Path.segments. These APIs decompose a path into its component parts.
    • New: FileSystem.listOrNull() returns a directory's children, or null if the path doesn't reference a readable directory.
    • New: Option to fail if the file being updated doesn't already exist: mustExist. Use this to avoid creating a new file when your intention is to update an existing file.
    • New: Option to fail if a file being created already exists: mustCreate. Use this to avoid updating an existing file when your intention is to create a new file.
    • Fix: Restore support for Kotlin/JS on browser platforms. We were relying on NodeJS-only features to fetch the local directory separator (/ or \) and temporary directory.
    • Fix: Don't ignore the caller's specified write offset running Okio on Kotlin/Native on Linux. (FileHandle.write() was broken and always appended to the end of the file.)