{"id":13424521,"url":"https://github.com/cxong/tinydir","last_synced_at":"2025-05-16T13:05:13.616Z","repository":{"id":6710329,"uuid":"7955903","full_name":"cxong/tinydir","owner":"cxong","description":"Lightweight, portable and easy to integrate C directory and file reader","archived":false,"fork":false,"pushed_at":"2024-02-27T21:55:08.000Z","size":176,"stargazers_count":828,"open_issues_count":5,"forks_count":128,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-04-02T06:41:44.757Z","etag":null,"topics":["c","directory","filesystem","header-only","portable","posix"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cxong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-02-01T10:05:40.000Z","updated_at":"2025-03-27T22:30:39.000Z","dependencies_parsed_at":"2024-10-26T23:43:35.533Z","dependency_job_id":"d80e424a-9dde-44bf-aebc-7624a45b9789","html_url":"https://github.com/cxong/tinydir","commit_stats":{"total_commits":152,"total_committers":20,"mean_commits":7.6,"dds":0.5460526315789473,"last_synced_commit":"9f866c1ec09e62aa4df50d7209556ed705a4dd90"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cxong%2Ftinydir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cxong%2Ftinydir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cxong%2Ftinydir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cxong%2Ftinydir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cxong","download_url":"https://codeload.github.com/cxong/tinydir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999859,"owners_count":21031046,"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":["c","directory","filesystem","header-only","portable","posix"],"created_at":"2024-07-31T00:00:55.564Z","updated_at":"2025-04-09T08:05:08.716Z","avatar_url":"https://github.com/cxong.png","language":"C","readme":"TinyDir\n=======\n[![CMake](https://github.com/cxong/tinydir/actions/workflows/cmake.yml/badge.svg)](https://github.com/cxong/tinydir/actions/workflows/cmake.yml)\n[![Release](http://img.shields.io/github/release/cxong/tinydir.svg)](https://github.com/cxong/tinydir/releases/latest)\n\nLightweight, portable and easy to integrate C directory and file reader. TinyDir wraps dirent for POSIX and FindFirstFile for Windows.\n\nWindows unicode is supported by defining `UNICODE` and `_UNICODE` before including `tinydir.h`.\n\nExample\n=======\n\nThere are two methods. Error checking omitted:\n\n```C\ntinydir_dir dir;\ntinydir_open(\u0026dir, \"/path/to/dir\");\n\nwhile (dir.has_next)\n{\n\ttinydir_file file;\n\ttinydir_readfile(\u0026dir, \u0026file);\n\n\tprintf(\"%s\", file.name);\n\tif (file.is_dir)\n\t{\n\t\tprintf(\"/\");\n\t}\n\tprintf(\"\\n\");\n\n\ttinydir_next(\u0026dir);\n}\n\ntinydir_close(\u0026dir);\n```\n\n```C\ntinydir_dir dir;\nint i;\ntinydir_open_sorted(\u0026dir, \"/path/to/dir\");\n\nfor (i = 0; i \u003c dir.n_files; i++)\n{\n\ttinydir_file file;\n\ttinydir_readfile_n(\u0026dir, \u0026file, i);\n\n\tprintf(\"%s\", file.name);\n\tif (file.is_dir)\n\t{\n\t\tprintf(\"/\");\n\t}\n\tprintf(\"\\n\");\n}\n\ntinydir_close(\u0026dir);\n```\n\nSee the `/samples` folder for more examples, including an interactive command-line directory navigator.\n\nLanguage\n========\n\nANSI C, or C90.\n\nPlatforms\n=========\n\nPOSIX and Windows supported. Open to the possibility of supporting other platforms.\n\nLicense\n=======\n\nSimplified BSD; if you use tinydir you can comply by including `tinydir.h` or `COPYING` somewhere in your package.\n\nKnown Limitations\n=================\n\n- Limited path and filename sizes\n- [Possible race condition bug if folder being read has changing content](https://github.com/cxong/tinydir/issues/13)\n- Does not support extended-length path lengths in Windows - paths are limited to 260 characters. See \u003chttps://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry\u003e\n","funding_links":[],"categories":["Miscellaneous","C++","File System","File Managment"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcxong%2Ftinydir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcxong%2Ftinydir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcxong%2Ftinydir/lists"}