{"id":21839212,"url":"https://github.com/alibasiccoder/fs-pro-rust","last_synced_at":"2025-03-21T15:21:20.577Z","repository":{"id":57632080,"uuid":"306613357","full_name":"AliBasicCoder/fs-pro-rust","owner":"AliBasicCoder","description":"working with files easily","archived":false,"fork":false,"pushed_at":"2021-01-15T17:53:42.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T08:16:59.063Z","etag":null,"topics":["filesystem","rust"],"latest_commit_sha":null,"homepage":"https://docs.rs/fs_pro","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AliBasicCoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-23T11:16:46.000Z","updated_at":"2021-01-19T20:14:13.000Z","dependencies_parsed_at":"2022-08-31T13:02:46.638Z","dependency_job_id":null,"html_url":"https://github.com/AliBasicCoder/fs-pro-rust","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliBasicCoder%2Ffs-pro-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliBasicCoder%2Ffs-pro-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliBasicCoder%2Ffs-pro-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliBasicCoder%2Ffs-pro-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AliBasicCoder","download_url":"https://codeload.github.com/AliBasicCoder/fs-pro-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244819801,"owners_count":20515646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filesystem","rust"],"created_at":"2024-11-27T21:16:40.297Z","updated_at":"2025-03-21T15:21:20.539Z","avatar_url":"https://github.com/AliBasicCoder.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fs pro\n\n\u003e A library to work with files easily\n\n![crates.io](https://img.shields.io/crates/v/fs_pro.svg)\n![Crates.io](https://img.shields.io/crates/d/fs_pro)\n\nthe is a beta rust version of [fs-pro](https://github.com/AliBasicCoder/fs-pro)\n\nsee the full docs [here](https://docs.rs/fs_pro)\n\n## Features\n\n- you don't have to work with std api's\n- easy to use\n\n## Usage\n\n```rust\nuse fs_pro::{Dir, File, Shape, error::Result};\n\n#[derive(Shape)]\nstruct ChildShapedDir {\n  #[name = \"child_file.txt\"]\n  child_file: File\n  // ...\n}\n\n#[derive(Shape)]\nstruct MyShapedDir {\n  #[name = \"my_file.txt\"]\n  my_file: File,\n  #[pattern = \"*.txt\"]\n  my_dir: Dir,\n  child_shaped_dir: ChildShapedDir\n}\n\n\nfn main() -\u003e Result\u003c()\u003e {\n  let file = File::new(\"my_file.txt\");\n  // create the file\n  file.create();\n  // write to file\n  file.write(\"hello there\");\n  // read file\n  file.read_to_string(); // =\u003e \"hello there\"\n  // and much more...\n  let dir = Dir::new(\"my_dir\");\n  // create the dir\n  dir.create();\n  // create a file in it\n  dir.create_file(\"my_file.txt\").unwrap().write(\"hello world\");\n  // create a dir in it\n  dir.create_dir(\"my_dir\");\n\n  let shape: Shape\u003cMyShapedDir\u003e = Shape::new();\n  let shape_inst = shape.create_at(\"target\").unwrap();\n  println!(\"{:?}\", shape_inst.my_file); // File\n  println!(\"{:?}\", shape_inst.my_dir); // Dir\n  println!(\"{:?}\", shape_inst.child_shaped_dir.child_file); // File\n\n  // and much more...\n  Ok(())\n}\n```\n\n## rust features\n\n- json: adds method json on File\n\n## Licence\n\nCopyright (c) 2020 AliBasicCoder\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibasiccoder%2Ffs-pro-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falibasiccoder%2Ffs-pro-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibasiccoder%2Ffs-pro-rust/lists"}