{"id":21570580,"url":"https://github.com/jcash/fileevents","last_synced_at":"2025-03-18T06:14:21.977Z","repository":{"id":151219601,"uuid":"99678157","full_name":"JCash/fileevents","owner":"JCash","description":"Some experiments for file events","archived":false,"fork":false,"pushed_at":"2017-08-08T10:03:33.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-24T12:45:33.068Z","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/JCash.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":"2017-08-08T09:58:14.000Z","updated_at":"2017-08-08T10:03:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa221f5c-91f6-4d9b-a6b2-b2a0090c272d","html_url":"https://github.com/JCash/fileevents","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JCash%2Ffileevents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JCash%2Ffileevents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JCash%2Ffileevents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JCash%2Ffileevents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JCash","download_url":"https://codeload.github.com/JCash/fileevents/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244166758,"owners_count":20409179,"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-24T11:13:10.582Z","updated_at":"2025-03-18T06:14:21.972Z","avatar_url":"https://github.com/JCash.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nThe FileEvents library\n======================\n\nThe file events library started as an experiment to try to learn things I haven't tried before:\nUsing file events (on any platform) and using C++11 threads.\n\nGoals\n=====\n\nThere were a few distinct goals that inspired the fileevents library\n\n* One library that works for \"all\" platforms\n* Tiny code.\n* C++11 threads\n* No Update() loop. All events must be processed by a separate thread\n\n\nBuilding it\n===========\n\nUsing waf to build requires you have python in your path:\n\u003e ./waf configure build test\n\nThe library is built with all warnings turned on (pedantic) to make\nit easier to integrate into your own projects.\n \n\n\nNotes\n=====\n\nThere are some things that are good to know.\n\nThe implementations for each platform are based on these apis:\n* Windows - [ReadDirectoryChangesW](http://msdn.microsoft.com/en-us/library/windows/desktop/aa365465(v=vs.85).aspx)\n* OSX - [FSEvents](https://developer.apple.com/library/mac/documentation/Darwin/Reference/FSEvents_Ref/Reference/reference.html)\n* Linux - [inotify](http://perkamon.alioth.debian.org/online/man7/inotify.7.php)\n\nSymlinks\n--------\n\nFile operations regarding symlinks are resolved to use the actual name.\n\nE.g. this will trigger a create event for 'foo/test.txt'\n\u003e mkdir foo\n\u003e ln -s foo bar\n\u003e touch bar/test.txt\n\nAnd (of course), removing the symlink, won't trigger events for the subdirectories or files.\n\n\nDifferences\n===========\n\nThere are a few notable differences between the platform specific file events libraries.\n\nWindows\n-------\n\n\n\nOSX\n------\n\nDarwin has the best granularity of events and also, it's a complete\njournaling system, which allows you to get events from a given time.\n\nIn the FSEvent system, you can watch folders (and their sub folders)\nby passing in the top folder.  \n\n\nOne thing that FSEvents can do, is pass along a flag which says if the path is a file or a folder.\nThis might be useful, especially if the the file or folder was removed.\n\n\nLinux\n-----\n\nUnfortunately, the [inotify](http://perkamon.alioth.debian.org/online/man7/inotify.7.php) library\ndoesn't have the ability to watch subdirectories recursively. So ``fileevents`` has to detect\nexisting directories and directory creation, and add these to the watch.\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcash%2Ffileevents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcash%2Ffileevents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcash%2Ffileevents/lists"}