Skip to content

Conversation

ForliyScarlet
Copy link
Member

@ForliyScarlet ForliyScarlet commented Oct 14, 2024

Resource:

val resource = fileResource("/path/file.txt")
val resource1 = fileResource("path", "file.txt")
// JVM: Resources.valueOfFilePath(...)

Image:

import love.forte.simbot.message.OfflineImage.fileOfflineImage

val fileImage = fileOfflineImage("/path/img.png")
val fileImage1 = fileOfflineImage("path", "img.png")
// JVM: OfflineImage.ofFilePath

内部基于 kotlinx-io, 由于其尚未1.0,因此暂不对外暴露任何 kotlinx.io (除了两个标记了实验性API的 Resource 的扩展接口)

see also: #950

@ForliyScarlet ForliyScarlet added the 特性 一个新特性,或者一个新的功能/能力 label Oct 14, 2024
@ForteScarlet ForteScarlet merged commit 66a8c84 into v4-dev Oct 14, 2024
5 of 6 checks passed
@ForteScarlet ForteScarlet deleted the support-ktx-io branch October 14, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
特性 一个新特性,或者一个新的功能/能力
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants