extern crate io; #[macro_use] extern crate null_terminated; extern crate unix; use io::Write; use unix::{File, dir::Dir}; fn main() { let mut d = Dir::new_boxed(::unix::file::open_at(None, str0!("."), ::unix::file::OpenMode::RdOnly, None).unwrap(), 2048).unwrap(); let mut f = File::new_unchecked(1); while let Some(entry) = d.next_entry() { f.writev(&[&entry.name, "\n".as_bytes()]).unwrap(); } }