Function try_map_or_cloned

Source
pub fn try_map_or_cloned<F: Read + AsRawFd + IntoRawFd>(
    file: F,
    perm: Perm,
    flags: impl MapFlags,
) -> Result<MappedFile<File>>
Expand description

Attempt to map a file, if it fails, copy that file into memory and map that.

ยงReturns

A map over the file, or a map over an in-memory copy of the file.