Crate fs_pro

Crate fs_pro 

Source
Expand description

§fs pro

A library to work with files easily

crates.io Crates.io

the is a beta rust version of fs-pro

see the full docs here

§Features

  • you don’t have to work with std api’s
  • easy to use

§Usage

use fs_pro::{Dir, File, error::Result};

fn main() -> Result<()> {
  let file = File::new("my_file.txt");
  // create the file
  file.create();
  // write to file
  file.write("hello there");
  // read file
  file.read_to_string(); // => "hello there"
  // and much more...
  let dir = Dir::new("my_dir");
  // create the dir
  dir.create();
  // create a file in it
  dir.create_file("my_file.txt").unwrap().write("hello world");
  // create a dir in it
  dir.create_dir("my_dir");
  // and much more...
}

§Licence

Copyright (c) 2020 AliBasicCoder

Re-exports§

pub use shape::Shape;

Modules§

error
a module that has every thing about errors
shape
this module contains every thing about Shape

Macros§

join
join paths together and returns PathBuf

Structs§

Dir
the Dir struct is a struct for helping you working with directories
File
the File struct is a struct to help you work with files
ParsedPathDir
the result of fs_pro::Dir::parse_path
ParsedPathFile
the result of fs_pro::File::parse_path

Enums§

DirEntry
the result of Dir.read() this struct express a item in a folder

Derive Macros§

Shape