Light Novel Reader Api
Toggle table of contents
release
Target filter
release
Switch theme
Search in API
Skip to content
Light Novel Reader Api
Light Novel Reader Api
/
io.nightfish.lightnovelreader.api
/
PluginContext
Plugin
Context
class
PluginContext
(
val
dataDir
:
File
,
val
pluginFile
:
File
,
assetDir
:
File
)
插件运行时的上下文对象 宿主会将此对象注入到插件中,供插件访问它的资源和文件目录
Since
Api 2
Members
Constructors
Plugin
Context
Link copied to clipboard
constructor
(
dataDir
:
File
,
pluginFile
:
File
,
assetDir
:
File
)
Properties
data
Dir
Link copied to clipboard
val
dataDir
:
File
插件的私有数据目录
plugin
File
Link copied to clipboard
val
pluginFile
:
File
插件自身的 APK 文件
Functions
get
Asset
Link copied to clipboard
fun
getAsset
(
path
:
String
)
:
File
获取插件资源目录中的文件