All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.com.github.insanusmokrassar.TelegramBotAPI.utils.StorageFile.kt Maven / Gradle / Ivy

package com.github.insanusmokrassar.TelegramBotAPI.utils

import io.ktor.utils.io.streams.asInput
import java.io.File
import java.nio.file.Files

fun StorageFile(
    file: File
) = StorageFile(
    StorageFileInfo(
        Files.probeContentType(file.toPath()),
        file.name
    )
) {
    file.inputStream().asInput()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy