0.0.1 |
|
---|
#81 in #prelude
90KB
3K SLoC
示例
文件系统
use iofs::prelude::*;
fn main() -> std::io::Result<()> {
let mut f = FileInfo::open_smart("foo.txt")?;
f.rename("new_name")?;
assert!(f.name(), "new_name.txt");
Ok(())
}
IO
use iofs::io::Console;
fn main() -> stools::io::Result<()> {
let mut console = Console::new();
let n = console.input::<i32>(Some("input a number: "))?;
Ok(())
}
依赖
~0–13MB
~101K SLoC