|
LuaSTG-x Core API
|
Classes | |
| class | BinaryReader |
| class | BinaryWriter |
| class | FileSeekOrigin |
| class | FileStream |
| class | ReplayFrameReader |
| 将二进制数值转换为按键状态 More... | |
| class | ReplayFrameWriter |
| class | ReplayManager |
Public Member Functions | |
| static function | BAND (local a, local b) |
| static function | Class (local base) |
| 声明一个类 More... | |
| static function | CreateDirectory (local path) |
| static function | DirectoryExists (local path) |
| static function | EnumFiles (local path) |
| static function | enumFiles (local path) |
| static function | enumFilesByType (local path, local suffix) |
| static function | error (local msg, local title, local exit) |
| static function | FileExists (local path) |
| static function | getWritablePath () |
| static function | isDesktop () |
| static function | isMobile () |
| static function | TryCatch (local t) |
| 模拟TryCatch块 More... | |
枚举目录中的文件或文件夹,仅本地文件
结果表述为:
{ { isDirectory = false, name = "abc.txt", lastAccessTime = 0, size = 0 },
{ isDirectory = true, name = "test" } }
| path | string 目录 |
| path | string |
| suffix | string |
gives an error by a messagebox
| msg | string |
| title | string |
| exit | boolean true if omitted |
| static function getWritablePath | ( | ) |
getWriteablePath
| static function isDesktop | ( | ) |
| static function isMobile | ( | ) |
模拟TryCatch块
| t | table 条件上下文 |
执行一个try..catch..finally块
当try语句中出现错误时,将把错误信息发送到catch语句块,否则返回try函数结果
当catch语句块被执行时,若发生错误将重新抛出,否则返回catch函数结果
finally块总是会保证在try或者catch后被执行