{"id":13411122,"url":"https://github.com/onox/inotify-ada","last_synced_at":"2026-02-19T10:19:04.760Z","repository":{"id":87597163,"uuid":"194539716","full_name":"onox/inotify-ada","owner":"onox","description":"An Ada 2012 library for monitoring filesystem events using Linux' inotify API","archived":false,"fork":false,"pushed_at":"2022-07-30T07:37:29.000Z","size":82,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-31T20:44:51.091Z","etag":null,"topics":["ada","filemonitor","filesystem","inotify","linux"],"latest_commit_sha":null,"homepage":null,"language":"Ada","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2019-06-30T16:50:39.000Z","updated_at":"2022-02-03T20:05:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"98bbe2bd-8fce-4492-a5fc-086f5cbbbabb","html_url":"https://github.com/onox/inotify-ada","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onox%2Finotify-ada","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onox%2Finotify-ada/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onox%2Finotify-ada/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onox%2Finotify-ada/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onox","download_url":"https://codeload.github.com/onox/inotify-ada/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243610809,"owners_count":20319029,"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":["ada","filemonitor","filesystem","inotify","linux"],"created_at":"2024-07-30T20:01:11.552Z","updated_at":"2026-02-19T10:18:59.740Z","avatar_url":"https://github.com/onox.png","language":"Ada","funding_links":[],"categories":["Libraries"],"sub_categories":["Linux and POSIX"],"readme":"[![Build status](https://github.com/onox/inotify-ada/actions/workflows/build.yaml/badge.svg)](https://github.com/onox/inotify-ada/actions/workflows/build.yaml)\n[![Alire crate](https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/inotify.json)](https://alire.ada.dev/crates/inotify.html)\n[![License](https://img.shields.io/github/license/onox/inotify-ada.svg?color=blue)](https://github.com/onox/inotify-ada/blob/master/LICENSE)\n[![GitHub release](https://img.shields.io/github/release/onox/inotify-ada.svg)](https://github.com/onox/inotify-ada/releases/latest)\n[![IRC](https://img.shields.io/badge/IRC-%23ada%20on%20libera.chat-orange.svg)](https://libera.chat)\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.svg)](https://gitter.im/ada-lang/Lobby)\n\n# inotify-ada\n\nAn Ada 2012 library to monitor filesystem events using Linux' inotify API.\n\n## Usage\n\n```ada\nwith Ada.Command_Line;\nwith Ada.Text_IO;\n\nwith Inotify.Recursive;\n\nprocedure Example is\n   Instance : Inotify.Recursive.Recursive_Instance;\n\n   procedure Handle_Event\n     (Subject      : Inotify.Watch;\n      Event        : Inotify.Event_Kind;\n      Is_Directory : Boolean;\n      Name         : String)\n   is\n      Kind : constant String := (if Is_Directory then \"directory\" else \"file\");\n   begin\n      Ada.Text_IO.Put_Line (Event'Image \u0026 \" \" \u0026 Instance.Name (Subject));\n      Ada.Text_IO.Put_Line (\"  [\" \u0026 Kind \u0026 \"] '\" \u0026 Name \u0026 \"'\");\n   end Handle_Event;\nbegin\n   Instance.Add_Watch\n     (Path =\u003e Ada.Command_Line.Argument (1),\n      Mask =\u003e (Modified | Closed_Write | Closed_No_Write =\u003e True, others =\u003e False));\n\n   while Instance.Has_Watches loop\n      Instance.Process_Events (Handle_Event'Access);\n   end loop;\nend Example;\n```\n\nAn optional second access-to-procedure parameter can be added to `Process_Events`\nto handle move events. See [`examples/monitor.adb`][url-example].\n\n## Dependencies\n\nIn order to build the library, you need to have:\n\n * An Ada 2012 compiler implementing `GNAT.OS_Lib`\n\n * [Alire][url-alire] and (optionally) `make`\n\n## Using the library\n\nUse the library in your crates as follows:\n\n```\nalr with inotify\n```\n\n## Installing the tools\n\nA tool to monitor a folder for any event can be build and run with:\n\n```\n$ alr run --args=\"path/to/folder\"\n```\n\nAlternatively, it can be build and installed with:\n\n```\n$ make\n$ make PREFIX=~/.local install\n```\n\nRun `inotify-ada path/to/folder` to monitor the folder for events.\n\n## Contributing\n\nPlease read the [contributing guidelines][url-contributing] before opening\nissues or pull requests.\n\n## License\n\nThis library is distributed under the terms of the [Apache License 2.0][url-apache].\n\n  [url-alire]: https://alire.ada.dev/\n  [url-apache]: https://opensource.org/licenses/Apache-2.0\n  [url-contributing]: /CONTRIBUTING.md\n  [url-example]: /examples/monitor.adb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonox%2Finotify-ada","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonox%2Finotify-ada","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonox%2Finotify-ada/lists"}