Walk the directory tree recursively. Yields all files (not directories) under the given path, respecting ignore patterns. The `.atomic` directory is always excluded.
(&self, path: &str)
| 40 | /// Yields all files (not directories) under the given path, respecting |
| 41 | /// ignore patterns. The `.atomic` directory is always excluded. |
| 42 | pub fn walk_files(&self, path: &str) -> io::Result<Vec<String>> { |
| 43 | let abs_path = if path.is_empty() { |
| 44 | self.root().to_path_buf() |
| 45 | } else { |
| 46 | self.resolve_path(path)? |
| 47 | }; |
| 48 | |
| 49 | let mut files = Vec::new(); |
| 50 | self.walk_files_recursive(&abs_path, &mut files)?; |
| 51 | files.sort(); |
| 52 | Ok(files) |
| 53 | } |
| 54 | |
| 55 | /// Recursive helper for walk_files. |
| 56 | fn walk_files_recursive(&self, dir: &Path, files: &mut Vec<String>) -> io::Result<()> { |