{"id":21315416,"url":"https://github.com/20yyq/inotify","last_synced_at":"2026-05-11T03:51:16.650Z","repository":{"id":72939250,"uuid":"603928605","full_name":"20yyq/inotify","owner":"20yyq","description":"Linux inotify","archived":false,"fork":false,"pushed_at":"2023-03-01T11:59:19.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T21:32:02.719Z","etag":null,"topics":["events","fsinotify","golang","inotify","inotify-tools","inotifywait","inotifywatch","linux","watcher","windows"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/20yyq.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":"2023-02-20T00:37:03.000Z","updated_at":"2024-10-24T13:19:53.000Z","dependencies_parsed_at":"2024-02-06T03:15:42.667Z","dependency_job_id":null,"html_url":"https://github.com/20yyq/inotify","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"32da361cc8e8e609c8b04d9727f835af0768f957"},"previous_names":["20yyq/goinotify"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/20yyq/inotify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20yyq%2Finotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20yyq%2Finotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20yyq%2Finotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20yyq%2Finotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/20yyq","download_url":"https://codeload.github.com/20yyq/inotify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20yyq%2Finotify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32880788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["events","fsinotify","golang","inotify","inotify-tools","inotifywait","inotifywatch","linux","watcher","windows"],"created_at":"2024-11-21T18:19:51.877Z","updated_at":"2026-05-11T03:51:16.615Z","avatar_url":"https://github.com/20yyq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# inotify\nLinux inotify\n## 简介\n\t这是一个可以监听多个文件和目录的项目，可以实现多路监听者。所有监听者保留监听文件或者目录的绝对路径，所有如果监听的文件或者目录本身发生了\n\tDELETE_SELF、MOVE_SELF这两个事件的时候，将会被完全关闭监听者。\n\t\n# 例子\n```go\n\nfunc main() {\n\tw, err := inotify.NewWatcher()\n\tif err != nil {\n\t\tfmt.Println(\"NewWatcher err\", err)\n\t\treturn\n\t}\n\tw.AddWatch(\"/temp\", syscall.IN_OPEN|syscall.IN_CLOSE|syscall.IN_DELETE|syscall.IN_DELETE_SELF|syscall.IN_CREATE|syscall.IN_IGNORED|syscall.IN_MODIFY|syscall.IN_MOVE|syscall.IN_MOVE_SELF|syscall.IN_MOVED_FROM|syscall.IN_MOVED_TO|syscall.IN_MOVE_SELF|syscall.IN_ATTRIB)\n\tfmt.Println(\"start\")\n\tfor {\n\t\tws, err := w.WaitEvent()\n\t\tif err != nil {\n\t\t\tfmt.Println(\"WaitEvent Error\", err)\n\t\t\ttime.Sleep(time.Millisecond*300)\n\t\t\tcontinue\n\t\t}\n\t\tfmt.Println(\"WaitEvent:\", ws.Mask, ws.FileName, ws.GetEventName())\n\t}\n\tfmt.Println(\"end\")\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F20yyq%2Finotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F20yyq%2Finotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F20yyq%2Finotify/lists"}