{"_id":"fsmonitor","_rev":"39-32c95a3a5b5b5ee65d1d85f2b765d7e6","name":"fsmonitor","description":"Fine-grained cross-platform file system monitoring for Node.js","dist-tags":{"latest":"0.2.4"},"versions":{"0.1.0":{"name":"fsmonitor","version":"0.1.0","description":"Fine-grained cross-platform file system monitoring for Node.js","main":"lib/index.js","directories":{"test":"test"},"bin":{"fsmonitor":"bin/fsmonitor.js"},"dependencies":{"debug":"~0.7.0","pathspec":"~0.9.2"},"devDependencies":{"mocha":"~1.6.0","scopedfs":"~0.1.0"},"scripts":{"test":"./node_modules/mocha/bin/mocha -R ${REPORTER-spec}"},"repository":{"type":"git","url":"https://github.com/andreyvit/fsmonitor.js.git"},"keywords":["fs","file","watch","watcher","monitor","change"],"author":{"name":"Andrey Tarantsov","email":"andrey@tarantsov.com"},"license":"MIT","_id":"fsmonitor@0.1.0","dist":{"shasum":"0ef2cc1bd6531f92c0ca6232d95932537ef542a0","tarball":"https://registry.npmjs.org/fsmonitor/-/fsmonitor-0.1.0.tgz","integrity":"sha512-2oH1qX49ZRU9ua6hwhDSYAYiUWZJQnUpAewS/RHeHibw+FaLvIxnZKcVgH1W4XHVU0kjSS5x3P6rzR+bQUTIVg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE/pDDtm2Sh3jBtjSDAm9kzhaXbTbq06q3+nhcCWkhx+AiBYkyYvCYnTvVeIW5nrpUdTm9EBOqnI1n0+/7/kv8xiLQ=="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"andreyvit","email":"andrey@tarantsov.com"},"maintainers":[{"name":"andreyvit","email":"andrey@tarantsov.com"}]},"0.1.1":{"name":"fsmonitor","version":"0.1.1","description":"Fine-grained cross-platform file system monitoring for Node.js","main":"lib/index.js","directories":{"test":"test"},"bin":{"fsmonitor":"bin/fsmonitor.js"},"dependencies":{"debug":"~0.7.0","pathspec":"~0.9.2"},"devDependencies":{"mocha":"~1.6.0","scopedfs":"~0.1.0"},"scripts":{"test":"./node_modules/mocha/bin/mocha -R ${REPORTER-spec}"},"repository":{"type":"git","url":"https://github.com/andreyvit/fsmonitor.js.git"},"keywords":["fs","file","watch","watcher","monitor","change"],"author":{"name":"Andrey Tarantsov","email":"andrey@tarantsov.com"},"license":"MIT","_id":"fsmonitor@0.1.1","dist":{"shasum":"43be097c97395765d89cd7bd191b8fed409c1359","tarball":"https://registry.npmjs.org/fsmonitor/-/fsmonitor-0.1.1.tgz","integrity":"sha512-0a46F9lByb9EETvJqDrFf5CDGClWJ7X6xxzaogx6nkZuz0kgSdB72eOqjGtxZAUybsZmIw8xQJ9p8/C+aWzzlg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEQxU8/pG2tScxODvPv0bXVdAwIHJkYXIDsyimQX3w4AIhALlfnJUSIgY5XuiRsG6iGnlNDz3jRuJJcLxqv36JM2tQ"}]},"_npmVersion":"1.1.62","_npmUser":{"name":"andreyvit","email":"andrey@tarantsov.com"},"maintainers":[{"name":"andreyvit","email":"andrey@tarantsov.com"}]},"0.1.2":{"name":"fsmonitor","version":"0.1.2","description":"Fine-grained cross-platform file system monitoring for Node.js","main":"lib/index.js","directories":{"test":"test"},"bin":{"fsmonitor":"bin/fsmonitor.js"},"dependencies":{"debug":"~0.7.0","pathspec":"~0.9.2"},"devDependencies":{"mocha":"~1.6.0","scopedfs":"~0.1.0"},"scripts":{"test":"./node_modules/mocha/bin/mocha -R ${REPORTER-spec}"},"repository":{"type":"git","url":"https://github.com/andreyvit/fsmonitor.js.git"},"keywords":["fs","file","watch","watcher","monitor","change"],"author":{"name":"Andrey Tarantsov","email":"andrey@tarantsov.com"},"license":"MIT","_id":"fsmonitor@0.1.2","dist":{"shasum":"d46c62a3dd1f09a1b0752f9fe01306845464251e","tarball":"https://registry.npmjs.org/fsmonitor/-/fsmonitor-0.1.2.tgz","integrity":"sha512-tQfnasZBkD9p4K5mZzLQ/LbwHa6IOWrF/77ngID7fZEeAMKkZ7lqD0QSUfMyQEfFQJm1FvNMJVch/IVpR2zgPg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcbFcECoZBemABIMfpS7QhiF0eMwND2AiMpT2/EBFP4wIhALoBeouLgZL7tFSCPIOl6lg1pS6zy23v2NPVP2kGsJUY"}]},"_npmVersion":"1.1.62","_npmUser":{"name":"andreyvit","email":"andrey@tarantsov.com"},"maintainers":[{"name":"andreyvit","email":"andrey@tarantsov.com"}]},"0.2.0":{"name":"fsmonitor","version":"0.2.0","description":"Fine-grained cross-platform file system monitoring for Node.js","main":"lib/index.js","directories":{"test":"test"},"bin":{"fsmonitor":"bin/fsmonitor.js"},"dependencies":{"debug":"~0.7.0","pathspec":"~0.9.2"},"devDependencies":{"mocha":"~1.6.0","scopedfs":"~0.1.0"},"scripts":{"test":"./node_modules/mocha/bin/mocha -R ${REPORTER-spec}"},"repository":{"type":"git","url":"https://github.com/andreyvit/fsmonitor.js.git"},"keywords":["fs","file","watch","watcher","monitor","change"],"author":{"name":"Andrey Tarantsov","email":"andrey@tarantsov.com"},"license":"MIT","_id":"fsmonitor@0.2.0","dist":{"shasum":"fe5785272345ed28bcad9ff022b28c12c1690bf4","tarball":"https://registry.npmjs.org/fsmonitor/-/fsmonitor-0.2.0.tgz","integrity":"sha512-E4Ci7Pb3Ytn+OA38yzONCnvPLdSH+vyiGRTxTMedrEIwdKOTdaPYefCnmGX+3wYpEAsK+RQLV+uw5W7CFxLJkw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH3Xaf3/G3qaO1D98dL1VQ4ONFug1I17oc+ysSL2TuscAiB5x49QIK1xXdiE5ewTRZwPFwwF+zrr8ji0j3T++KTf2A=="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"andreyvit","email":"andrey@tarantsov.com"},"maintainers":[{"name":"andreyvit","email":"andrey@tarantsov.com"}]},"0.2.1":{"name":"fsmonitor","version":"0.2.1","description":"Fine-grained cross-platform file system monitoring for Node.js","main":"lib/index.js","directories":{"test":"test"},"bin":{"fsmonitor":"bin/fsmonitor.js"},"dependencies":{"debug":"~0.7.0","pathspec":"~0.9.2"},"devDependencies":{"mocha":"~1.6.0","scopedfs":"~0.1.0"},"scripts":{"test":"./node_modules/mocha/bin/mocha -R ${REPORTER-spec}"},"repository":{"type":"git","url":"https://github.com/andreyvit/fsmonitor.js.git"},"keywords":["fs","file","watch","watcher","monitor","change"],"author":{"name":"Andrey Tarantsov","email":"andrey@tarantsov.com"},"license":"MIT","_id":"fsmonitor@0.2.1","dist":{"shasum":"d71a87e4046be6adfb048768e6b7e0768a11ed85","tarball":"https://registry.npmjs.org/fsmonitor/-/fsmonitor-0.2.1.tgz","integrity":"sha512-pjbSFGnNT5ZRCLM8I9Po3xPGqjrycnmpZzYgtaoK85KZ6X2FG3hSSTwz407zELxo4Gi3pxdo6CxYCeGuEdXGCg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBFoGhXryTZP9W2iVVtsXTMQFTZ0cSBY0duR+aGN2oAxAiEAy1eaFNWI0wPcIiGmjjyOJ/4ys/N1JkisODdUJpvqr0g="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"andreyvit","email":"andrey@tarantsov.com"},"maintainers":[{"name":"andreyvit","email":"andrey@tarantsov.com"}]},"0.2.2":{"name":"fsmonitor","version":"0.2.2","description":"Fine-grained cross-platform file system monitoring for Node.js","main":"lib/index.js","directories":{"test":"test"},"bin":{"fsmonitor":"bin/fsmonitor.js"},"dependencies":{"debug":"~0.7.0","pathspec":"~0.9.2"},"devDependencies":{"mocha":"~1.6.0","scopedfs":"~0.1.0"},"scripts":{"test":"./node_modules/mocha/bin/mocha -R ${REPORTER-spec}"},"repository":{"type":"git","url":"https://github.com/andreyvit/fsmonitor.js.git"},"keywords":["fs","file","watch","watcher","monitor","change"],"author":{"name":"Andrey Tarantsov","email":"andrey@tarantsov.com"},"license":"MIT","_id":"fsmonitor@0.2.2","dist":{"shasum":"98f5c6808ecbd042da31b0f1a97bad4c164f4d15","tarball":"https://registry.npmjs.org/fsmonitor/-/fsmonitor-0.2.2.tgz","integrity":"sha512-OME6Mm+HGIBgBiDERRLrVIrlo1r07lx3rhB2iP+rL3aLgmlGJlWTo8BqOh7JMECO4EqGCg70AEL9tYxRN6oi0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD43c2b9VW4W8uZO45TIxtKjGiNFwlwROepum2AxZXj1QIhALY3FwjrKfwvXA/p3s/ZaawQWdNwYJmCU7BBUhi3YJ4S"}]},"_from":".","_npmVersion":"1.2.12","_npmUser":{"name":"andreyvit","email":"andrey@tarantsov.com"},"maintainers":[{"name":"andreyvit","email":"andrey@tarantsov.com"}]},"0.2.4":{"name":"fsmonitor","version":"0.2.4","description":"Fine-grained cross-platform file system monitoring for Node.js","main":"lib/index.js","directories":{"test":"test"},"bin":{"fsmonitor":"bin/fsmonitor.js"},"dependencies":{"debug":"~0.7.0","pathspec":"~0.9.2"},"devDependencies":{"iced-coffee-script":"~1.7.1-f","mocha":"~1.6.0","scopedfs":"~0.1.0"},"scripts":{"pretest":"./node_modules/.bin/iced -I inline -c lib/*.iced lib/watchers/*.iced test/*.iced","test":"./node_modules/mocha/bin/mocha -R ${REPORTER-spec}"},"repository":{"type":"git","url":"https://github.com/andreyvit/fsmonitor.js.git"},"keywords":["fs","file","watch","watcher","monitor","change"],"author":{"name":"Andrey Tarantsov","email":"andrey@tarantsov.com"},"license":"MIT","bugs":{"url":"https://github.com/andreyvit/fsmonitor.js/issues"},"_id":"fsmonitor@0.2.4","dist":{"shasum":"cfcc5bc9f95eef05eb619690240871a7bc7ee826","tarball":"https://registry.npmjs.org/fsmonitor/-/fsmonitor-0.2.4.tgz","integrity":"sha512-P91j/MSJ5P4GfG7EqmlTHklxtiiEXg0NOkS5oFIpyzEpdeP9WlPlVt8qRMQO5eqIJm7/KRnbIWjX3Ql1KAJpNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCooSHhScazsNBk1Ht7+LaBdMaA46+OOowni4HW863JtgIgBJ6TM1x6IFKGCWlwSxyrP7Cd6wsU6rk2YOvKbRYPvJM="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"nitoyon","email":"nitoyon@gmail.com"},"maintainers":[{"name":"andreyvit","email":"andrey@tarantsov.com"},{"name":"nitoyon","email":"nitoyon@gmail.com"}]}},"readme":"# File-grained cross-platform FS monitoring for Node.js\r\n\r\n**Wait, wait, how's it different from `fs.watch`?** Unlike `fs.watch`, fsmonitor:\r\n\r\n* monitors an entire subtree (`fs.watch` only monitors a single folder)\r\n* gives you the entire list of added, removed and modified files and folders (e.g. when you add or delete a non-empty folder, the change event will contain a list of all files in that folder)\r\n\r\nHere's what happens when you call `fsmonitor.watch(path)`:\r\n\r\n* The specified file system subtree is scanned, and the stat data is kept in memory.\r\n* `fs.watch` is called to start monitoring every subfolder encountered.\r\n* When change events are reported, the subtree is rescanned to determine the list of changes.\r\n* `fs.watch` is called for the new subfolders, and the watchers are shut down for the removed ones.\r\n\r\n\r\n## Status\r\n\r\nAlpha stage. Seems to work, waiting for feedback, shipping as part of LiveReload 0.5 for Windows.\r\n\r\nPlanned features:\r\n\r\n* only reporting changes in the files matching .gitignore-style masks you specify (using pathspec module for handling masks)\r\n* more efficient native code implementations on Mac and Windows\r\n* offloading per-folder monitoring backends to child processes to avoid hitting the limit on the number of file handles\r\n\r\n\r\n## Installation\r\n\r\n    npm install fsmonitor\r\n\r\nor, to use fsmonitor command-line tool (see below):\r\n\r\n    npm install -g fsmonitor\r\n\r\n\r\n## Usage\r\n\r\n    fsmonitor = require('fsmonitor');\r\n    fsmonitor.watch('/some/folder', null, function(change) {\r\n        console.log(\"Change detected:\\n\" + change);  # has a nice toString\r\n\r\n        console.log(\"Added files:    %j\", change.addedFiles);\r\n        console.log(\"Modified files: %j\", change.modifiedFiles);\r\n        console.log(\"Removed files:  %j\", change.removedFiles);\r\n\r\n        console.log(\"Added folders:    %j\", change.addedFolders);\r\n        console.log(\"Modified folders: %j\", change.modifiedFolders);\r\n        console.log(\"Removed folders:  %j\", change.removedFolders);\r\n    });\r\n\r\n    var monitor = fsmonitor.watch('.', {\r\n        // include files\r\n        matches: function(relpath) {\r\n            return relpath.match(/\\.js$/i) !== null;\r\n        },\r\n        // exclude directories\r\n        excludes: function(relpath) {\r\n            return relpath.match(/^\\.git$/i) !== null;\r\n        }\r\n    });\r\n    monitor.on('change', function(changes) {\r\n        console.log(changes);\r\n    });\r\n\r\n\r\n## Command-line tool\r\n\r\nIncludes a command-line tool that can report changes and/or run a specified command on every change.\r\n\r\nFor example, to invoke `npm test` when any JavaScript file is modified:\r\n\r\n    fsmonitor -s -p '+*.js' npm test\r\n\r\nUsage:\r\n\r\n    Usage: fsmonitor [-d <folder>] [-p] [-s] [-q] [<mask>]... [<command> <arg>...]\r\n\r\n    Options:\r\n      -d <folder>        Specify the folder to monitor (defaults to the current folder)\r\n      -p                 Print changes to console (default if no command specified)\r\n      -s                 Run the provided command once on start up\r\n      -q                 Quiet mode (don't print the initial banner)\r\n\r\n    Masks:\r\n      +<mask>            Include only the files matching the given mask\r\n      !<mask>            Exclude files matching the given mask\r\n\r\n      If no inclusion masks are provided, all files not explicitly excluded will be included.\r\n\r\n    General options:\r\n      --help             Display this message\r\n      --version          Display fsmonitor version number\r\n\r\n\r\n## Unit test\r\n\r\nInstall necessary modules:\r\n\r\n    npm install\r\n\r\nStart `npm test` to run the unit tests:\r\n\r\n    npm test\r\n","maintainers":[{"name":"andreyvit","email":"andrey@tarantsov.com"},{"name":"nitoyon","email":"nitoyon@gmail.com"}],"time":{"modified":"2022-06-18T03:59:30.174Z","created":"2012-10-16T15:02:05.455Z","0.1.0":"2012-10-16T15:02:08.384Z","0.1.1":"2012-10-16T15:50:13.747Z","0.1.2":"2012-10-31T04:55:15.737Z","0.2.0":"2012-11-05T03:28:48.468Z","0.2.1":"2013-02-24T18:08:16.599Z","0.2.2":"2013-03-19T12:04:48.935Z","0.2.3":"2014-08-20T13:55:04.199Z","0.2.4":"2014-08-20T14:45:04.463Z"},"author":{"name":"Andrey Tarantsov","email":"andrey@tarantsov.com"},"repository":{"type":"git","url":"https://github.com/andreyvit/fsmonitor.js.git"},"keywords":["fs","file","watch","watcher","monitor","change"],"license":"MIT","readmeFilename":"README.md","bugs":{"url":"https://github.com/andreyvit/fsmonitor.js/issues"},"users":{"fedor":true,"vamakoda":true,"alimaster":true}}