{"id":29471862,"url":"https://github.com/sinistersnare/ds_store","last_synced_at":"2025-07-14T14:04:20.121Z","repository":{"id":57622077,"uuid":"163382194","full_name":"sinistersnare/ds_store","owner":"sinistersnare","description":"A Rusty .DS_Store file parser!","archived":false,"fork":false,"pushed_at":"2022-12-23T15:44:40.000Z","size":36,"stargazers_count":28,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T03:43:28.177Z","etag":null,"topics":["crate","crates","cratesio","ds-store","rust"],"latest_commit_sha":null,"homepage":"","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/sinistersnare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-28T07:45:35.000Z","updated_at":"2024-08-28T21:11:17.000Z","dependencies_parsed_at":"2023-01-30T19:01:02.621Z","dependency_job_id":null,"html_url":"https://github.com/sinistersnare/ds_store","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sinistersnare/ds_store","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinistersnare%2Fds_store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinistersnare%2Fds_store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinistersnare%2Fds_store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinistersnare%2Fds_store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinistersnare","download_url":"https://codeload.github.com/sinistersnare/ds_store/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinistersnare%2Fds_store/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265304534,"owners_count":23743880,"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":["crate","crates","cratesio","ds-store","rust"],"created_at":"2025-07-14T14:02:05.489Z","updated_at":"2025-07-14T14:04:20.109Z","avatar_url":"https://github.com/sinistersnare.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Rusty `.DS_Store` Parser #\n\n[![Chrono on crates.io][cratesio-image]][cratesio]\n[![Chrono on docs.rs][docsrs-image]][docsrs]\n\n[cratesio-image]: https://img.shields.io/crates/v/ds_store.svg\n[cratesio]: https://crates.io/crates/ds_store\n[docsrs-image]: https://docs.rs/ds_store/badge.svg\n[docsrs]: https://docs.rs/ds_store\n\n## Get The Library! ##\n\nadd something like this to your `Cargo.toml` file:\n\n```toml\n[dependencies]\nds_store = \"0.3\"\n```\n\n## Usage ##\n\n```rust\nextern crate ds_store;\n\nuse std::collections::HashMap;\nuse std::{io::Read, fs::File};\nuse ds_store::{DsStore, RecordValue};\n\nfn main() {\n    let args: Vec\u003cString\u003e = std::env::args().collect();\n    if args.len() != 2 {\n        println!(\"Incorrect usage! `./binary_path /path/to/.DS_Store\");\n        return;\n    }\n\n    let mut file = File::open(\u0026args[1]).expect(\"Could not open file.\");\n    let mut buf: Vec\u003cu8\u003e = vec![];\n    file.read_to_end(\u0026mut buf).expect(\"Could not read file to end.\");\n\n    let store: DsStore = match DsStore::new(\u0026buf) {\n        Ok(s) =\u003e s,\n        Err(e) =\u003e {\n            println!(\"Could not construct the DS_Store: {:?}\", e);\n            return;\n        }\n    };\n    let records: \u0026HashMap\u003cString, HashMap\u003c\u0026str, RecordValue\u003e\u003e = store.contents();\n    records.iter().for_each(|r| println!(\"{:?}\", r));\n    println!(\"printed {:?} records\", records.len());\n}\n```\n\nThis example is replicated in `examples/basic.rs`. Call it with `$ cargo run --example basic examples/basic.DS_Store`\n\n## Rust Version ##\n\nShould be 2015 edition compatible!\n\n## License ##\n\nThis code is distributed under the ***MIT license***.\nPlease see the LICENSE.md file for information.\n\n\n## What is a `.DS_Store` file? ##\n\nThe _Desktop Services Store_ is mostly just deleted without a second thought. However, such files can be helpful! What are they really for?\n\nPut simply, `.DS_Store` files are used on MacOS Computers to describe the contents of the directory they are in.\n`.DS_Store`'s are created, maintained, and read by the Finder application to properly render directories.\nThe things that this file describes includes properties set in the directory options, file icons, directory background color or image, and many more things.\n\nThe file has 3 important sections. First, the prelude, which gives information about where to find the main information block of the file. Second, the information block, containing bookkeeping information for the data-section. Finally, the data section, holding the actual metadata of the directory.\n\n\n## TODO ##\n\nLooking at this list, I probably should not have released the library so early! I was so excited though!\nOh well, I guess I better get to improving it!\n\n* Address the various TODOs within the code.\n* Document everything!\n* Rigorous testing? Probably!\n    * Make sure to test with background images and all sorts of stuff.\n* Better API? What do _you_ want to do with DS_Store files? Let me know! Make an issue!\n* Creation/manipulation of `.DS_Store` files?????\n* Make no_std compatible? Probably not gonna happen. std types too nice.\n* Add logging, to log assumptions made being proved wrong (like 'icgo' record not being `0x0000000000000004`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinistersnare%2Fds_store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinistersnare%2Fds_store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinistersnare%2Fds_store/lists"}