Skip to main content

FileRemoveHook

Type Alias FileRemoveHook 

Source
pub type FileRemoveHook = fn(filename: &[u8]) -> Result<(), LuaError>;
Expand description

Function-pointer signature for removing a file, installed on GlobalState::file_remove_hook by the embedder.

std::fs is banned outside lua-cli, so lua-stdlib’s os.remove reaches the filesystem via this hook. Returns Ok(()) on success.