From 267b725b2171ff75899a9a40e85ba64f12c608fa Mon Sep 17 00:00:00 2001 From: Noel Date: Thu, 21 Jul 2022 21:01:20 -0700 Subject: [PATCH] chore: spotless apply :sparkles: --- .../remi/filesystem/FilesystemStorageTrailer.kt | 3 ++- .../org/noelware/remi/filesystem/Stats.kt | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/support-fs/src/main/kotlin/org/noelware/remi/filesystem/FilesystemStorageTrailer.kt b/support-fs/src/main/kotlin/org/noelware/remi/filesystem/FilesystemStorageTrailer.kt index 8b70d90a..8b1b21da 100644 --- a/support-fs/src/main/kotlin/org/noelware/remi/filesystem/FilesystemStorageTrailer.kt +++ b/support-fs/src/main/kotlin/org/noelware/remi/filesystem/FilesystemStorageTrailer.kt @@ -89,8 +89,9 @@ class FilesystemStorageTrailer(override val config: FilesystemStorageConfig): St log.info("Using directory $directory to store data!") val store = directory.toPath().fileStore() - if (store.isReadOnly) + if (store.isReadOnly) { throw IllegalStateException("Directory $directory can't be readonly.") + } log.info("using drive [${store.name()}] with type [${store.type()}] that has ${store.totalSpace / 1000} bytes of total space, with ${store.usableSpace / 1000} bytes of used space.") } diff --git a/support-fs/src/main/kotlin/org/noelware/remi/filesystem/Stats.kt b/support-fs/src/main/kotlin/org/noelware/remi/filesystem/Stats.kt index 9805cd3e..f04acffd 100644 --- a/support-fs/src/main/kotlin/org/noelware/remi/filesystem/Stats.kt +++ b/support-fs/src/main/kotlin/org/noelware/remi/filesystem/Stats.kt @@ -1,3 +1,20 @@ +/* + * 🧶 Remi: Library to handling files for persistent storage with Google Cloud Storage and Amazon S3-compatible server, made in Kotlin! + * Copyright 2022 Noelware + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.noelware.remi.filesystem import kotlinx.serialization.SerialName