{"id":18479298,"url":"https://github.com/yybit/ext4fs-rs","last_synced_at":"2025-06-15T11:33:01.447Z","repository":{"id":217481203,"uuid":"744035920","full_name":"yybit/ext4fs-rs","owner":"yybit","description":"Rust implementation of ext4 file system in user space.","archived":false,"fork":false,"pushed_at":"2024-01-16T14:07:37.000Z","size":27,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T16:11:11.416Z","etag":null,"topics":["ext4","filesystem"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yybit.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-16T14:04:16.000Z","updated_at":"2025-01-03T13:40:58.000Z","dependencies_parsed_at":"2024-01-16T19:00:39.127Z","dependency_job_id":"a0bd03d5-2965-44f1-831b-ea42177cf83f","html_url":"https://github.com/yybit/ext4fs-rs","commit_stats":null,"previous_names":["yybit/ext4fs-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yybit%2Fext4fs-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yybit%2Fext4fs-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yybit%2Fext4fs-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yybit%2Fext4fs-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yybit","download_url":"https://codeload.github.com/yybit/ext4fs-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247872126,"owners_count":21010180,"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":["ext4","filesystem"],"created_at":"2024-11-06T12:14:03.395Z","updated_at":"2025-04-08T15:34:26.276Z","avatar_url":"https://github.com/yybit.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![crates.io](https://img.shields.io/crates/v/ext4fs.svg)](https://crates.io/crates/ext4fs)\n[![docs.rs](https://docs.rs/ext4fs/badge.svg)](https://docs.rs/ext4fs)\n\n## ext4fs-rs\n\nRust implementation of ext4 file system in user space. The ext4 file system can be read directly without mounting, write operations are not supported yet. Your contributions are welcome.\n\n:warning::warning::warning: The current api is not stable, it may be modified later, and more tests and documentation will need to be added.\n\n\n### Example\n\n* New File System\n\n```rust\n// Read a raw ext4 image file.\nlet file = std::fs::File::open(\"testdata/test.ext4\").unwrap();\nlet reader = BufReader::new(file);\nlet mut fs = ext4fs::FileSystem::from_reader(reader).unwrap();\n```\n\n* Iterate a directory\n\n```rust\nlet rd = fs.read_dir(\"/dir1\").unwrap();\nfor x in rd {\n    println!(\"{}\", x.unwrap().get_name_str());\n}\n```\n\n* Stat a file\n\n```rust\nlet m = fs.metadata(\"/hello.txt\").unwrap();\nprintln!(\n    \"uid={} gid={} permissions={:o} len={} created={:?} accessed={:?} modified={:?}\",\n    m.uid(),\n    m.gid(),\n    m.permissions(),\n    m.len(),\n    m.created(),\n    m.accessed(),\n    m.modified(),\n);\n```\n\n* Read symlink\n\n```rust\nlet p = fs.read_link(\"/hello.txt.lnk\").unwrap();\nprintln!(\"{}\", p.to_str().unwrap());\n```\n\n* Read all contents of file\n\n```rust\nlet b = fs.read(\"/hello.txt\").unwrap();\nassert_eq!(\"hello\\n\", String::from_utf8_lossy(\u0026b).to_string());\n```\n\n* Read file on demand\n\n```rust\nlet mut f = fs.open(\"/hello.txt\").unwrap();\nf.seek(std::io::SeekFrom::Start(2)).unwrap();\nlet mut buf = String::new();\nf.read_to_string(\u0026mut buf).unwrap();\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyybit%2Fext4fs-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyybit%2Fext4fs-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyybit%2Fext4fs-rs/lists"}