Very basic stuff working on linux 32-bit with dmd and phobos2.

This commit is contained in:
Steve King 2010-08-10 21:55:30 -07:00
commit 67f0225e42
152 changed files with 113 additions and 0 deletions

View file

@ -0,0 +1,95 @@
/**
*
* INotify Class
*
* Authors: Tim Burrell
* Copyright: Copyright (c) 2007
* License: <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>
*
**/
////////////////////////////////////////////////////////////////////////////
// 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
}