{"id":17617542,"url":"https://github.com/ravenox/watch-win","last_synced_at":"2025-03-30T00:41:29.929Z","repository":{"id":69551594,"uuid":"55078144","full_name":"RaveNoX/watch-win","owner":"RaveNoX","description":"File tree watch for node on Windows","archived":false,"fork":false,"pushed_at":"2016-03-30T17:19:26.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T17:16:42.441Z","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/RaveNoX.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":"2016-03-30T16:15:57.000Z","updated_at":"2016-04-22T21:55:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"7a6275e6-5f58-463a-8d98-6050fdd4ac40","html_url":"https://github.com/RaveNoX/watch-win","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"9c50ba44fe4ff7865c4048b42e877156e9b510e6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaveNoX%2Fwatch-win","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaveNoX%2Fwatch-win/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaveNoX%2Fwatch-win/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaveNoX%2Fwatch-win/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RaveNoX","download_url":"https://codeload.github.com/RaveNoX/watch-win/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246262492,"owners_count":20749170,"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-10-22T19:14:22.517Z","updated_at":"2025-03-30T00:41:29.914Z","avatar_url":"https://github.com/RaveNoX.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Watch-Win \r\n\r\n[![NPM](https://nodei.co/npm/watch-win.png)](https://nodei.co/npm/watch-win/)\r\n\r\nNative directory tree watcher for [Node.js](http://nodejs.org/) on Windows \r\n\r\n## Installation\r\n\r\n\t$ npm install watch-win\r\n    \r\n## Usage\r\n\r\n```js\r\nvar Watcher = require('watch-win');\r\n\r\nvar watcher = new Watcher({\r\n    path: __dirname    \r\n});\r\n\r\nconsole.log('id: ' + watcher.id()); // native Id\r\n\r\nwatcher.on('raw', function(data){ // raw event\r\n    console.log(data);\r\n});\r\n\r\nwatcher.on('changed', function(path){\r\n    console.log('changed: ' + path);    \r\n});\r\n\r\nwatcher.on('renamed', function(path, oldPath){\r\n    console.log('renamed: ' + oldPath + ' -\u003e ' + path);\r\n});\r\n\r\nconsole.log(watcher.running()); // is running\r\n\r\nwatcher.close(); // destroy watcher\r\n\r\n```\r\n\r\n### Events\r\n\r\n* *raw* - RAW event emmited by native watcher. Takes `info` argument like this object: \r\n\r\n```js\r\n{ \r\n  type: 'renamed',\r\n  path: '\u003cpath to dir\u003e/test.js',\r\n  name: 'test.js',\r\n  oldPath: '\u003cpath to dir\u003e/old/test.js',\r\n  name: 'test.js'\r\n}\r\n```\r\n\r\n* *changed* - The change of a file or folder. The types of changes include: changes to size, attributes, security settings, last write, and last access time. Takes `path` argument.\r\n* *created* - The creation of a file or folder. Takes `path` argument.\r\n* *deleted* - The deletion of a file or folder. Takes `path` argument.\r\n* *renamed* - The renaming of a file or folder. Takes `path`, `oldPath` arguments.\r\n* *error* - Native worker emits error. Takes `error` argument\r\n\r\n\r\n## License\r\nThe MIT License\r\n\r\nCopyright (c) 2016 Artur Kraev\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in\r\nall copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\nTHE SOFTWARE.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravenox%2Fwatch-win","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fravenox%2Fwatch-win","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravenox%2Fwatch-win/lists"}