event.commandLineDir

类型 字符串
事件 system
版本 版本 2024.3703
关键词 system, commandLineDir
另请参阅 event.commandLineArgs

概述

提供 event.commandLineArgs 的工作目录的绝对路径。如果接收到的命令行参数数组提供了文件或目录的相对路径,则它们是相对于此属性的工作目录的。如果需要,您可以使用 Lua 文件系统 库的lfs.chdir( path )函数将应用程序的当前工作目录更改为此属性提供的工作目录。

注意事项

此属性仅在 event.type"applicationOpen"event.commandLineArgs 属性存在时才适用于 Win32 桌面应用程序。