{"id":13588342,"url":"https://github.com/njdehoog/Witness","last_synced_at":"2025-04-08T03:33:30.958Z","repository":{"id":63919304,"uuid":"43001649","full_name":"njdehoog/Witness","owner":"njdehoog","description":"Monitor file system events using Swift","archived":false,"fork":false,"pushed_at":"2019-05-10T08:32:29.000Z","size":21558,"stargazers_count":166,"open_issues_count":2,"forks_count":28,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-01T09:20:44.114Z","etag":null,"topics":["events","file-system","monitor","swift","watch"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/njdehoog.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}},"created_at":"2015-09-23T13:11:26.000Z","updated_at":"2024-07-26T15:10:37.000Z","dependencies_parsed_at":"2023-01-14T14:00:30.606Z","dependency_job_id":null,"html_url":"https://github.com/njdehoog/Witness","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/njdehoog%2FWitness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njdehoog%2FWitness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njdehoog%2FWitness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njdehoog%2FWitness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/njdehoog","download_url":"https://codeload.github.com/njdehoog/Witness/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223300742,"owners_count":17122680,"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":["events","file-system","monitor","swift","watch"],"created_at":"2024-08-01T15:06:39.083Z","updated_at":"2024-11-06T07:31:23.740Z","avatar_url":"https://github.com/njdehoog.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# Witness\nMonitor file system changes using Swift. Witness provides a wrapper around the [File System Events](https://developer.apple.com/library/mac/documentation/Darwin/Conceptual/FSEvents_ProgGuide/Introduction/Introduction.html) API for OS X.\n\n## Installation\n\nThe recommended way to include Witness in your project is by using [Carthage](https://github.com/Carthage/Carthage). Simply add this line to your `Cartfile`:\n\n    github \"njdehoog/Witness\" ~\u003e 0.1\n\n## Usage\n\nImport the framework\n```swift\nimport Witness\n```\n\n### Monitor file system events\n\nThis will trigger an event when a file in the Desktop directory is created, deleted or modified.\n```swift\nif let desktopPath = NSSearchPathForDirectoriesInDomains(.desktopDirectory, .userDomainMask, true).first {\n    self.witness = Witness(paths: [desktopPath], flags: .FileEvents, latency: 0.3) { events in\n        print(\"file system events received: \\(events)\")\n    }\n}\n```\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## Credits\n\nWitness was developed for use in [Spelt](http://spelt.io). If you like this library, please consider supporting development by purchasing the app.\n\n## License\n\nWitness is released under the MIT license. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnjdehoog%2FWitness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnjdehoog%2FWitness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnjdehoog%2FWitness/lists"}