//! Small filesystem helpers that behave the same on every platform.
use io;
use Path;
/// Replace `to` with `from`.
///
/// Unix `rename` atomically replaces the destination. Windows fails when the
/// destination exists, so fall back to removing it first. State and taste
/// writes go through here so they work on all three platforms.