pub fn is_writable(dir: &Path) -> bool
Returns true if dir exists and is writable (or can be created).
true
dir
Uses tempfile::tempfile_in so no named probe file is left on disk, even if the process is killed during the check.
tempfile::tempfile_in