list

Function list 

Source
pub fn list(reader: &mut impl CarReader) -> Result<(), CarError>
Expand description

the list file_name from car file by reader.

Examples found in repository?
examples/ls.rs (line 13)
5fn main() {
6    let file_name = std::env::args().nth(1);
7    let path = file_name.as_ref().map(|f| f.into()).unwrap_or_else(|| {
8        let file = std::path::Path::new("test");
9        file.join("carv1-basic.car")
10    });
11    let file = std::fs::File::open(path).unwrap();
12    let mut reader = reader::new_v1(file).unwrap();
13    rust_car::utils::list(&mut reader).unwrap();
14}