/** * * INotify Class * * Authors: Tim Burrell * Copyright: Copyright (c) 2007 * License: Apache License, Version 2.0 * **/ //////////////////////////////////////////////////////////////////////////// // Module /////////////////////////////////////// module libraryA.io.INotify; //////////////////////////////////////////////////////////////////////////// // Imports /////////////////////////////////////// import libraryA.core.Exception; //////////////////////////////////////////////////////////////////////////// // C Bindings /////////////////////////////////////// extern (C) int inotify_init(); //////////////////////////////////////////////////////////////////////////// // Typedef's / Enums /////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// // INotify Definition /////////////////////////////////////// /** * INotify Class **/ class INotify { //////////////////////////////////////////////////////////////////// // Constants /////////////////////////////// //////////////////////////////////////////////////////////////////// // Public members /////////////////////////////// //////////////////////////////////////////////////////////////////// // Construction /////////////////////////////// /** * Default Constructor **/ this () { // init inotify if ((mInotifyFD = inotify_init()) < 0) throw new Exception("Failed to Initialize INotify!"); } /** * Destructor **/ ~this () { //close(mInotifyFD); } //////////////////////////////////////////////////////////////////// // Public Functions /////////////////////////////// /** * Add a path to be watched by INotify * * Params: WatchPatch = Patch to Watch * Throws: **/ void addWatch(char [] WatchPatch) { } //////////////////////////////////////////////////////////////////// private: //////////////////////////////////////////////////////////////////// // Private Functions /////////////////////////////// //////////////////////////////////////////////////////////////////// // Private Members /////////////////////////////// int mInotifyFD; ///< Inotify File Descriptor }