rustc_incremental::persist::fs

Function safe_remove_dir_all

source
fn safe_remove_dir_all(p: &Path) -> Result<()>
Expand description

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.