Skip to main content

file_result

Function file_result 

Source
pub fn file_result(
    state: &mut LuaState,
    stat: bool,
    fname: Option<&[u8]>,
) -> Result<usize, LuaError>
Expand description

Push the result of a POSIX-style file operation onto the stack. On success pushes true; on failure pushes nil, errmsg, errno. Returns the number of pushed values.

C: LUALIB_API int luaL_fileresult(lua_State *L, int stat, const char *fname)