Listing 8 fhandle.cpp Adds file-specific capability to IoctlHandle
#include "fhandle.h" fileHandle *fileHandle::Init(const char *path ) { fileHandle *obj = new fileHandle( path); if( obj->_handle == -1 || obj->isDevice() ) { delete obj; return (fileHandle *) 0; } return obj; } fileHandle *fileHandle::Init(int handle ) { fileHandle *obj = new fileHandle( handle); if( obj->_handle == --1 || obj->isDevice() ) { delete obj; return (fileHandle *) 0; } return obj; } // End of File