我使用dofile执行APK文件是不行的,比如 dofile("assets/res/flist")
只能先拷贝到writablePath然后再dofile
拿到数据后再清除这个临时文件


虽然满足需求了,但还是略显奇葩

有一个更好的方案,是使用loadstring

local function doFile(path)
    local fileData = CZHelperFunc:getFileData(path)
    local data = loadstring(fileData)

    return data

end

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2021-11-28
  • 2021-07-18
  • 2021-06-05
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-05
  • 2022-12-23
  • 2022-01-14
  • 2021-06-08
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案