Code Monkey home page Code Monkey logo

libwatchman's Introduction

libwatchman Build Status

This is a C interface to watchman: https://www.github.com/facebook/watchman

You'll need jansson installed in order to use it, and check installed to run the tests.

Watchman is a wrapper around inotify, kevents, etc.

Using libwatchman is very straightforward: establish a connection with watchman_connect, do some commands, then disconnect with watchman_connection_close. These functions handle memory management for you.

To set up a watch on a directory, use watchman_watch.

To make a query, first construct an expression using the watchman_*_expression functions, then use watchman_do_query. It's OK to pass in a NULL value for the query parameter. You have to free expressions yourself, using watchman_free_expression, but freeing an expression will free all of its child expressions.

A word of warning: stat fields are only valid for results returned from watchman. You can choose these results by specifying flags for the query. If you do not specify flags for the query, then you will only get the default fields: name, exists, newer, size, mode

Memory management:

Watchman makes copies of all strings it has been given. Using the watchman_free_* functions will free these (as well as any other data that watchman has allocated). Watchman never frees anything that it hasn't created.

License

Copyright 2014-2015 Twitter, Inc and other contributors

Licensed under the MIT license

libwatchman's People

Contributors

dturner-tw avatar mcguigan avatar novalis avatar caniszczyk avatar bierbaum avatar avar avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.