{"id":18427165,"url":"https://github.com/fjebaker/znotify","last_synced_at":"2025-04-13T19:38:53.499Z","repository":{"id":239121191,"uuid":"798600202","full_name":"fjebaker/znotify","owner":"fjebaker","description":"An inotify wrapper for Zig.","archived":false,"fork":false,"pushed_at":"2024-11-24T22:32:43.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T01:06:59.524Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fjebaker.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-10T05:20:53.000Z","updated_at":"2024-11-24T22:32:46.000Z","dependencies_parsed_at":"2024-11-24T23:33:46.200Z","dependency_job_id":null,"html_url":"https://github.com/fjebaker/znotify","commit_stats":null,"previous_names":["fjebaker/znotify"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fznotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fznotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fznotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fznotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fjebaker","download_url":"https://codeload.github.com/fjebaker/znotify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248769471,"owners_count":21158817,"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":"2024-11-06T05:09:49.940Z","updated_at":"2025-04-13T19:38:53.464Z","avatar_url":"https://github.com/fjebaker.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# znotify\n\nExtending Zig's standard library wrapper of `std.posix.inotify*` to be Ziggier.\n\n```zig\nconst std = @import(\"std\");\nconst znotify = @import(\"znotify\");\n\npub fn main() !void {\n    var gpa = std.heap.GeneralPurposeAllocator(.{}){};\n    defer _ = gpa.deinit();\n    const allocator = gpa.allocator();\n\n    var notifier = try znotify.INotify.init(allocator);\n    defer notifier.deinit();\n\n    try notifier.watchPath(\n        \"src\",\n        .{\n            .create = true,\n            .modify = true,\n            .moved_to = true,\n            .moved_from = true,\n            .delete = true,\n        },\n    );\n\n    while (try notifier.poll()) |e| {\n        const path = try notifier.getPath(allocator, e);\n        defer allocator.free(path);\n        std.debug.print(\n            \"NotifyEvent: {s} ({s}) dir: {any}\\n\",\n            .{ path, @tagName(e.event), e.dir },\n        );\n    }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjebaker%2Fznotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffjebaker%2Fznotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjebaker%2Fznotify/lists"}