Skip to main content

migrate_path

Function migrate_path 

Source
pub fn migrate_path(old: &Path, new: &Path) -> bool
Expand description

Move old to new if old exists and new does not, returning whether anything moved. Works for a file or a directory.

The one-time carry behind every path this project has relocated. A destination that already exists wins and the old copy is left alone: whatever a newer lattice wrote is the live state. A failure is reported as false rather than an error — a cache that cannot be moved is rebuilt, and nothing here is worth failing a boot over.