Skip to main content

replace_content

Function replace_content 

Source
pub fn replace_content(path: &Path, bytes: &[u8]) -> Result<()>
Expand description

Give a message new content under the name it has. The bytes go to the maildir’s tmp/ first and are renamed over the message, so a crash leaves the old message or the new one, never a cut-off one (a plain write truncates first). A symlink, as in the notmuch view, is followed to the message it stands for.