Function self_replace::self_delete

source ·
pub fn self_delete() -> Result<(), Error>
Expand description

Deletes the executable in a platform independent manner.

The deletion on windows is delayed until the process shuts down. For updating instead of deleting, use self_replace instead. Not that on Windows you can only call this function once during the execution of the program.

self_replace::self_delete()?;