Files

interface Files : Variable

脚本中操作文件的接口.

Author

M8Test, [email protected], https://m8test.com

Functions

Link copied to clipboard
abstract fun buildFile(fileBuilder: FileBuilder.() -> Unit): ScriptFile

构建 ScriptFile 对象.

Link copied to clipboard
abstract fun getExternalFilesDir(type: String?): String?

返回所有共享/外部存储设备上特定于应用程序的目录的绝对路径, 应用程序可以在其中放置其拥有的持久文件.

Link copied to clipboard
abstract fun getFilesDir(): String

返回文件系统上目录的绝对路径, 使用 openFileOutput 创建的文件存储在该目录中.

Link copied to clipboard
abstract fun getGlobalName(): String

获取作为全局变量时的名称.

Link copied to clipboard
abstract fun getPublicType(): Type

获取 Variable 注入到脚本时需要显示的类型.

Link copied to clipboard
abstract fun isPrefixRequired(): Boolean

是否需要添加前缀, 每种编程语言添加的前缀不一样, 前缀可以通过 Language.getVariablePrefix 获取.

Link copied to clipboard
abstract fun isSuffixRequired(): Boolean

是否需要添加后缀, 每种编程语言添加的后缀不一样, 后缀可以通过 Language.getVariableSuffix 获取.

Link copied to clipboard
abstract fun unzipFile(src: ScriptFile, dest: ScriptFile, password: String?): List<ScriptFile>

解压文件.

Link copied to clipboard
abstract fun zipFile(src: ScriptFile, dest: ScriptFile, comment: String?): Result

压缩文件.