in src/main/kotlin/chats/ChatsCommand.kt [179:186]
fun ensureDirectoryExists(path: String) {
val directory = File(path)
if (!directory.exists()) {
if (!directory.mkdirs()) {
logger.error("Failed to create directory $path.")
}
}
}