MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / iter_files

Method iter_files

atomic-core/src/output/repo/outcome.rs:193–195  ·  view source on GitHub ↗

Get an iterator over files that were written. # Example ```rust use atomic_core::output::repo::OutputOutcome; let mut outcome = OutputOutcome::new(); outcome.record_file("main.rs", 100); outcome.record_file("lib.rs", 200); let paths: Vec<_> = outcome.iter_files().map(|f| &f.path).collect(); assert!(paths.contains(&&"main.rs".to_string())); assert!(paths.contains(&&"lib.rs".to_string())); ```

(&self)

Source from the content-addressed store, hash-verified

191 /// assert!(paths.contains(&&"lib.rs".to_string()));
192 /// ```
193 pub fn iter_files(&self) -> impl Iterator<Item = &FileWritten> {
194 self.files.iter()
195 }
196
197 /// Get an iterator over directories that were created.
198 pub fn iter_directories(&self) -> impl Iterator<Item = &String> {

Callers 1

test_iter_filesFunction · 0.80

Calls 1

iterMethod · 0.45

Tested by 1

test_iter_filesFunction · 0.64