0
녹 0.11텍스트 파일을 올바르게 읽는 방법?
초보자 질문 :
fn main() {
use std::io::File;
use std::str;
let unwrapped_data = match File::open(&Path::new("/proc/net/dev")).read_to_end() {
Ok(byte_mas) => byte_mas,
Err(why) => fail!("couldn't open: {}", why.desc),
};
println!("{}", str::from_utf8_owned(unwrapped_data));
}
출력 :
./netstat
Ok(Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
lo: 1534066 17270 0 0 0 0 0 0 1534066 17270 0 0 0 0 0 0
enp2s0: 251195693 592728 0 17723 0 0 0 0 43664332 107083 0 0 0 0 0 0
)
어떻게 '확인()'없이 읽을 수? 자세한 자세한 자세한 자세한 자세한 자세한 자세한 자세한
(당신은 '세부 사항'실제로 제공하지 않고 여러 번 반복해야하는하셨습니까 더 자세한 내용은?) – huon