List all files (not directories) in the working copy. # Example ```rust use atomic_core::output::Memory; let wc = Memory::new(); wc.add_file("a.txt", b""); wc.add_file("b.txt", b""); let files = wc.list_files(); assert_eq!(files.len(), 2); ```
(&self)
| 408 | /// assert_eq!(files.len(), 2); |
| 409 | /// ``` |
| 410 | pub fn list_files(&self) -> Vec<String> { |
| 411 | let files = self.files.borrow(); |
| 412 | files |
| 413 | .iter() |
| 414 | .filter(|(_, f)| !f.metadata.is_dir) |
| 415 | .map(|(p, _)| p.clone()) |
| 416 | .collect() |
| 417 | } |
| 418 | |
| 419 | /// List all paths (files and directories) in the working copy. |
| 420 | pub fn list_all_paths(&self) -> Vec<String> { |