[][src]Function rustc_incremental::persist::fs::safe_remove_dir_all

fn safe_remove_dir_all(p: &Path) -> Result<()>
🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Since paths of artifacts within session directories can get quite long, we need to support deleting files with very long paths. The regular WinApi functions only support paths up to 260 characters, however. In order to circumvent this limitation, we canonicalize the path of the directory before passing it to std::fs::remove_dir_all(). This will convert the path into the '\?' format, which supports much longer paths.