From 7c077e278b7266950a968a7e7f2f28b9a140ed96 Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Wed, 7 Sep 2022 22:20:00 +0200 Subject: new: option descriptions (#127) --- .../kotlin/cc/polyfrost/oneconfig/utils/dsl/IOUtilsDSL.kt | 12 ++++++++++++ .../cc/polyfrost/oneconfig/utils/dsl/NetworkUtilsDSL.kt | 7 ------- 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 src/main/kotlin/cc/polyfrost/oneconfig/utils/dsl/IOUtilsDSL.kt (limited to 'src/main/kotlin/cc') diff --git a/src/main/kotlin/cc/polyfrost/oneconfig/utils/dsl/IOUtilsDSL.kt b/src/main/kotlin/cc/polyfrost/oneconfig/utils/dsl/IOUtilsDSL.kt new file mode 100644 index 0000000..6b89fe6 --- /dev/null +++ b/src/main/kotlin/cc/polyfrost/oneconfig/utils/dsl/IOUtilsDSL.kt @@ -0,0 +1,12 @@ +package cc.polyfrost.oneconfig.utils.dsl + +import cc.polyfrost.oneconfig.utils.IOUtils +import cc.polyfrost.oneconfig.utils.NetworkUtils +import java.io.File + +/** + * Returns the SHA-256 hash of the given [File]. + * + * @see NetworkUtils.getFileChecksum + */ +fun File.checksum() = IOUtils.getFileChecksum(this) \ No newline at end of file diff --git a/src/main/kotlin/cc/polyfrost/oneconfig/utils/dsl/NetworkUtilsDSL.kt b/src/main/kotlin/cc/polyfrost/oneconfig/utils/dsl/NetworkUtilsDSL.kt index 56fba21..a744a29 100644 --- a/src/main/kotlin/cc/polyfrost/oneconfig/utils/dsl/NetworkUtilsDSL.kt +++ b/src/main/kotlin/cc/polyfrost/oneconfig/utils/dsl/NetworkUtilsDSL.kt @@ -30,13 +30,6 @@ import cc.polyfrost.oneconfig.utils.NetworkUtils import cc.polyfrost.oneconfig.libs.universal.UDesktop import java.io.File -/** - * Returns the SHA-256 hash of the given [File]. - * - * @see NetworkUtils.getFileChecksum - */ -fun File.checksum() = NetworkUtils.getFileChecksum(this) - /** * Downloads the given [url] to the given [File]. * -- cgit