Copy A Directory Recursively In Rust Without std::fs::copy
May 2024
See the notes below
```cargo
walkdir = "2.5.0"
```
use fs;
use PathBuf;
use WalkDir;
Output:
error: unknown start of token: `
--> _active_nvim_run:1:1
|
1 | ```cargo
| ^^^
|
= note: character appears 2 more times
help: Unicode character '`' (Grave Accent) looks like ''' (Single Quote), but it is not
|
1 - ```cargo
1 + '''cargo
|
error: unknown start of token: `
--> _active_nvim_run:4:1
|
4 | ```
| ^^^
|
= note: character appears 2 more times
help: Unicode character '`' (Grave Accent) looks like ''' (Single Quote), but it is not
|
4 - ```
4 + '''
|
error: expected one of `!` or `::`, found `[`
--> _active_nvim_run:2:1
|
1 | ```cargo
| - expected one of `!` or `::`
2 | [dependencies]
| ^ unexpected token
error: could not compile `_active_nvim_run` (bin "_active_nvim_run") due to 3 previous errors
Notes
- There's an issue with notify and std::fs::copy where copying a file triggers an event. That means you can't watch and copy files the way you'd expect because they keep triggeing themselves
- This is very naive (e.g. it doesn't deal with links or have substantial error handling)
end of line