Restructure FakeFs to let it model symlinks

Instead of storing paths, model the FS more directly
as nodes
This commit is contained in:
Max Brunsfeld 2022-07-14 18:07:55 -07:00 committed by Antonio Scandurra
parent 0aafc78eb7
commit f6c1393dfd
2 changed files with 528 additions and 306 deletions

View file

@ -1,4 +1,4 @@
use crate::{ProjectEntryId, RemoveOptions};
use crate::{copy_recursive, ProjectEntryId, RemoveOptions};
use super::{
fs::{self, Fs},
@ -731,8 +731,13 @@ impl LocalWorktree {
let fs = self.fs.clone();
let abs_new_path = abs_new_path.clone();
async move {
fs.copy(&abs_old_path, &abs_new_path, Default::default())
.await
copy_recursive(
fs.as_ref(),
&abs_old_path,
&abs_new_path,
Default::default(),
)
.await
}
});