Git Product home page Git Product logo

panoptes's Introduction

catch logo

Build Status

What is Panoptes?

Panoptes is a cross-platform file watcher library for C++17 using std::filesystem and native interfaces. It is tested on Linux, Windows and macOS platforms with the help of the test framework Catch2. The main target is to unify the APIs of Windows, Linux and macOS. In an earlier stage Panoptes was a fork of Axosoft nsfw.

What is supported?

Panoptes is observing all changes inside of a given directory. This includes add, modify or remove events. Even the changes inside of subdirectories (recursively) will be detected. Edge cases are covered too in case a file or directory will be moved in or out of the watched directory.

Which native APIs are used by Panoptes?

How to use it

  1. Include Panoptes to your project.
  2. Look into the small console example how to call and use the FileWatcher.

Conan

A conan package of the last release, can be created with the help of conanfile.py.

Wish list

Add rename/move support

Instead of detecting a rename/move event, Panoptes is detecting one add and one remove event. Under Linux in general and since Windows 10, it is possible to connect the add and remove event with each other to one rename/move event. But under MacOS (10.12) it seems to be not possible, because of the internal buffer system.

Direct return of the event in case it was detected

macOS buffers and stashes all detected events over a given time. This means that the callback of the native API is not returning immediately after a filesystem change happens. It waits for some time and then returns a batch of events. If the underlying filesystem is HFS+ (old filesystem of macOS) the buffering time has to be at least 1 second. To unify this experience Panoptes adds a buffer system to Linux and Windows, inspired by macOS. But it would be better if we find a way for macOS to return the results directly, instead of using for every platform a buffer system. With the new macOS filesystem APFS, it is possible to set the buffering time to some nanoseconds.

More

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.