Skip to main content

is_read_only_filesystem

Function is_read_only_filesystem 

Source
pub fn is_read_only_filesystem(err: &Error) -> bool
Expand description

Returns true when an io::Error indicates the underlying filesystem is mounted read-only (EROFS on Unix). The portable ErrorKind::ReadOnlyFilesystem is preferred when present; we also match the raw OS code because some platforms (notably older macOS surfaces and certain remote filesystems) do not always translate.