Skip to main content

check_location

Function check_location 

Source
pub fn check_location(path: &Path) -> LocationCheck
Expand description

Makes sure the store at path is there and can be written in.

The folder is made when it is missing: placing the store is the wizard’s whole job, and the same call at every later start repairs a store whose folders were removed. Writing is proven by writing, not guessed from permission bits, because a read-only mount and a full disk both look writable until something is written.

Blocks on the file system, so it belongs on a background thread.