{"id":24756341,"url":"https://github.com/dalance/fts-rs","last_synced_at":"2025-10-11T02:31:38.323Z","repository":{"id":52400564,"uuid":"53989113","full_name":"dalance/fts-rs","owner":"dalance","description":"A Rust library for high performance directory walking using libc fts.","archived":false,"fork":false,"pushed_at":"2023-12-12T02:42:10.000Z","size":694,"stargazers_count":18,"open_issues_count":4,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-02T01:12:11.010Z","etag":null,"topics":["libc-fts","rust-library"],"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/dalance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"dalance"}},"created_at":"2016-03-16T00:48:00.000Z","updated_at":"2024-02-14T20:31:25.000Z","dependencies_parsed_at":"2023-12-12T03:29:15.857Z","dependency_job_id":"c06dd227-0d75-47ac-ab71-114917cda281","html_url":"https://github.com/dalance/fts-rs","commit_stats":{"total_commits":61,"total_committers":2,"mean_commits":30.5,"dds":"0.032786885245901676","last_synced_commit":"401c0ab1758460eee48699038532d56eb7168d4e"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Ffts-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Ffts-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Ffts-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Ffts-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dalance","download_url":"https://codeload.github.com/dalance/fts-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236026026,"owners_count":19083306,"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":["libc-fts","rust-library"],"created_at":"2025-01-28T13:51:05.192Z","updated_at":"2025-10-11T02:31:33.026Z","avatar_url":"https://github.com/dalance.png","language":"Rust","funding_links":["https://github.com/sponsors/dalance"],"categories":[],"sub_categories":[],"readme":"# fts-rs\n\n[![Actions Status](https://github.com/dalance/fts-rs/workflows/Regression/badge.svg)](https://github.com/dalance/fts-rs/actions)\n[![Crates.io](https://img.shields.io/crates/v/fts.svg)](https://crates.io/crates/fts)\n[![Docs.rs](https://docs.rs/fts/badge.svg)](https://docs.rs/fts)\n[![codecov](https://codecov.io/gh/dalance/fts-rs/branch/master/graph/badge.svg)](https://codecov.io/gh/dalance/fts-rs)\n\nA Rust library for high performance directory walking using libc fts.\n\n[Documentation](https://docs.rs/fts)\n\n## Usage\n\n```Cargo.toml\n[dependencies]\nfts = \"0.3.0\"\n```\n\n## Example\n\nUse `WalkDir` for directory walking:\n\n```rust,skt-default\nuse std::path::Path;\nuse fts::walkdir::{WalkDir, WalkDirConf};\n\nlet path = Path::new( \".\" );\nfor p in WalkDir::new( WalkDirConf::new( path ) ) {\n    println!( \"{:?}\", p.unwrap() );\n}\n```\n\nCall `fts_*` function directly:\n\n```rust,skt-default\nuse std::ffi::CString;\nuse fts::ffi::{fts_open, fts_read, fts_close, FTS_LOGICAL};\n\nlet path    = CString::new( \".\" ).unwrap();\nlet paths   = vec![path.as_ptr(), std::ptr::null()];\nlet fts     = unsafe { fts_open ( paths.as_ptr(), FTS_LOGICAL, None ) };\nlet _ftsent = unsafe { fts_read ( fts ) };\nlet _       = unsafe { fts_close( fts ) };\n```\n\n## Benchmark\n\nA `cargo bench` result is the following.\n`fts_walkdir` is this library, `readdir` is `std::fs:read_dir`, `walkdir` is [walkdir::WalkDir](https://github.com/BurntSushi/walkdir).\na suffix `_metadata` means using call `DirEntry::metadata()`.\n\n```\ntest fts_walkdir          ... bench: 315,114,126 ns/iter (+/- 8,478,709)\ntest fts_walkdir_metadata ... bench: 480,089,245 ns/iter (+/- 11,478,335)\ntest readdir              ... bench: 575,856,224 ns/iter (+/- 15,021,486)\ntest readdir_metadata     ... bench: 790,838,218 ns/iter (+/- 12,780,010)\ntest walkdir              ... bench: 688,884,058 ns/iter (+/- 8,023,838)\ntest walkdir_metadata     ... bench: 904,379,691 ns/iter (+/- 10,212,776)\n```\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalance%2Ffts-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdalance%2Ffts-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalance%2Ffts-rs/lists"}