Argument #1 is 'string'; 'cc.FileUtils' expected

版本3.1.1

local fileutils = cc.FileUtils:getInstance()
local realPath = pathToSave .. "/package"
fileutils.isFileExist(realPath)

在lua中调用上面的代码报出下面错误:

— Begin quote from ____

error in function ‘lua_cocos2dx_FileUtils_isFileExist’.

 argument #1 is 'string'; 'cc.FileUtils' expected.

— End quote

是我参数传的不对吗?

fileutils:isFileExist(realPath)

This is ok.