{"id":27761060,"url":"https://github.com/tsoding/minirent","last_synced_at":"2026-03-08T21:09:51.674Z","repository":{"id":44533309,"uuid":"333191125","full_name":"tsoding/minirent","owner":"tsoding","description":"A subset of dirent interface for Windows.","archived":false,"fork":false,"pushed_at":"2023-09-09T11:19:45.000Z","size":18,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-09-09T12:29:24.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/tsoding.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":"2021-01-26T19:18:44.000Z","updated_at":"2023-09-07T19:33:53.000Z","dependencies_parsed_at":"2022-09-03T22:01:52.912Z","dependency_job_id":null,"html_url":"https://github.com/tsoding/minirent","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsoding%2Fminirent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsoding%2Fminirent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsoding%2Fminirent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsoding%2Fminirent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsoding","download_url":"https://codeload.github.com/tsoding/minirent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251499597,"owners_count":21599127,"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":[],"created_at":"2025-04-29T12:23:09.747Z","updated_at":"2026-03-08T21:09:46.644Z","avatar_url":"https://github.com/tsoding.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/tsoding/minirent/workflows/CI/badge.svg)](https://github.com/tsoding/minirent/actions)\n\n# minirent\n\nA subset of [dirent](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/dirent.h.html) interface for Windows.\n\nThe code that works with minirent must work with the dirent.\n\nUse minirent as a cross-platform replacement of dirent if you only need the subset interface.\n\n## Usage\n\n[minirent.h](./minirent.h) is an [stb-style](https://github.com/nothings/stb/blob/master/docs/stb_howto.txt) header-only library. That means that when you just include it it does not include the implementations of the functions. You have to define `MINIRENT_IMPLEMENTATION` macro:\n\n```c\n#include \u003cassert.h\u003e\n#include \u003cstdio.h\u003e\n#include \u003cstdlib.h\u003e\n\n#define MINIRENT_IMPLEMENTATION\n#include \u003cminirent.h\u003e\n\nint main(void)\n{\n    DIR *dir = opendir(\".\");\n    assert(dir);\n\n    errno = 0;\n    struct dirent *dp = NULL;\n    while ((dp = readdir(dir))) {\n        printf(\"%s\\n\", dp-\u003ed_name);\n    }\n    assert(errno == 0);\n\n    int err = closedir(dir);\n    assert(err == 0);\n\n    return 0;\n}\n```\n\nFor more information see [./examples/](./examples/) folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsoding%2Fminirent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsoding%2Fminirent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsoding%2Fminirent/lists"}