函数:userPath 获取当前工程路径

函数名称:获取当前工程路径

函数功能:获取积木工程文件夹路径

支持版本:仅支持 v1.1.0 及其以上版本

函数方法

path = userPath()

返回值 类型 说明
path string 获取积木工程文件夹路径

函数用例

--功能相当于是 /mnt/sdcard/LuaBox/Projects/脚本名称/
path = userPath();
--当前工程文件夹下的 cc.png 文件
path = path.."/cc.png"
--当前工程文件夹下的 11.log 文件
path = path.."/11.log"
Copyright 北京帮你玩科技有限公司 2024 all right reserved,powered by Gitbook该文章修订时间: 2025-06-27 11:25:39

results matching ""

    No results matching ""