Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

brctl-monitor

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

brctl-monitor

monitor the CloudDocs deamon

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

brctl-monitor

Monitor the CloudDocs deamon. brctl-monitor spawns brctl in monitor mode. Which in turn uses NSMetadataQuery to monitor the chosen container

usage

const Brctl = require(`brctl-monitor`)

Brctl()
  .then(brctl => {
    brctl.state.on(`data`, state => {
      console.log(JSON.stringify(state, null, 2))
      // {
      //   "timestamp": "2016-10-07 12:11:27 +0000",
      //   "stats": {
      //     "total": 1,
      //     "updated": 1
      //   },
      //   "files": [
      //     {
      //       "filename": "/test",
      //       "status": {
      //         "availability": {
      //           "local": true,
      //           "remote": true
      //         },
      //         "transfers": {
      //           "up": null,
      //           "down": null
      //         },
      //         "waiting": false,
      //         "error": false,
      //         "raw": " ☁"
      //       }
      //     }
      //   ]
      // }
    })
  })
  .catch(e => console.error(e))

brctl-monitor takes an optional options-object:

to restrict the NSMetadataQuery scope:

Brctl({ scope: `both` || `docs` || `data` })

monitoring a specific container:

Brctl({ container: Brctl.ICLOUD_DRIVE })

Keywords

FAQs

Package last updated on 29 Oct 2016

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