A library to work with files easily
the is a beta rust version of fs-pro
see the full docs here
```rust use fs_pro::{Dir, File, Shape, error::Result};
struct ChildShapedDir { #[name = "childfile.txt"] childfile: File // ... }
struct MyShapedDir { #[name = "myfile.txt"] myfile: File, #[pattern = "*.txt"] mydir: Dir, childshaped_dir: ChildShapedDir }
fn main() -> Result<()> { let file = File::new("myfile.txt"); // create the file file.create(); // write to file file.write("hello there"); // read file file.readtostring(); // => "hello there" // and much more... let dir = Dir::new("mydir"); // create the dir dir.create(); // create a file in it dir.createfile("myfile.txt").unwrap().write("hello world"); // create a dir in it dir.createdir("mydir");
let shape: Shape
// and much more... Ok(()) } ```
Copyright (c) 2020 AliBasicCoder