cap_primitives::fs

Function reopen

source
pub fn reopen(file: &File, options: &OpenOptions) -> Result<File>
Expand description

Re-open an fs::File to produce an independent handle.

This operation isn’t supported by all operating systems in all circumstances, or in some operating systems in any circumstances, so it may return an io::ErrorKind::Other error if the file cannot be reopened.