Socket
Socket
Sign inDemoInstall

fsevents

Package Overview
Dependencies
Maintainers
2
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fsevents

Native Access to MacOS FSEvents


Version published
Weekly downloads
23M
decreased by-4.98%
Maintainers
2
Weekly downloads
 
Created

What is fsevents?

The fsevents npm package is a Node.js module that provides native and efficient file system event watching on macOS. It is designed to be used by Node.js applications to receive notifications when the contents of a directory change, including file creations, modifications, and deletions. It leverages the macOS FSEvents API for optimal performance and accuracy.

What are fsevents's main functionalities?

Watching for file changes

This feature allows you to watch a directory for changes and execute a callback function whenever a change is detected. The callback receives the path of the changed file, flags that describe the change, and an event ID.

const fsevents = require('fsevents');
const watcher = fsevents.watch('/path/to/dir', (path, flags, id) => {
  console.log('File changed:', path);
});
watcher.start();

Stopping the watcher

This feature allows you to stop watching for file changes. It is useful when you no longer need to monitor a directory or when your application is shutting down.

watcher.stop();

Other packages similar to fsevents

Keywords

FAQs

Package last updated on 21 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc