Actually, there exists an API on file system level that happens to be only documented in the DDK, here it is (discussion found in some forum):
[later] After perusing \ddk\h (A great place find
"undocumented" os/2 APIs), it appears that you may the
correct -- the DosFindNotify...() apis no long exist as
32bit apis (but you can still import the 16bit ones if if
like).
They appear to have been replaced by something better
(which probably uses the FindNotify IFS services
underneath). You'll have to figure these out on your own
(please report back here);but they don't look too hard:
#pragma pack(1)
typedef struct _CNPATH { /* CHANGENOTIFYPATH */
ULONG oNextEntryOffset;
ULONG wFlags;
USHORT cbName;
CHAR szName[1];
} CNPATH;
typedef CNPATH *PCNPATH;
typedef struct _CNINFO { /* CHANGENOTIFYINFO */
ULONG oNextEntryOffset;
CHAR bAction;
USHORT cbName;
CHAR szName[1];
} CNINFO;
typedef CNINFO *PCNINFO;
#pragma pack()
// Equates for ChangeNotifyInfo baction field
#define RCNF_FILE_ADDED 0x0001
#define RCNF_FILE_DELETED 0x0002
#define RCNF_DIR_ADDED 0x0003
#define RCNF_DIR_DELETED 0x0004
#define RCNF_MOVED_IN 0x0005
#define RCNF_MOVED_OUT 0x0006
#define RCNF_CHANGED 0x0007
#define RCNF_OLDNAME 0x0008
#define RCNF_NEWNAME 0x0009
#define RCNF_DEVICE_ATTACHED 0x000A
#define RCNF_DEVICE_DETACHED 0x000B
APIRET APIENTRY DosOpenChangeNotify(PCNPATH PathBuf,
ULONG LogSize,
PHDIR hdir,
ULONG ulReserved);
APIRET APIENTRY DosResetChangeNotify(PCNINFO LogBuf,
ULONG BufferSize,
PULONG LogCount,
HDIR hdir);
APIRET APIENTRY DosCloseChangeNotify(HDIR hdir);
As you can see, changes to files are logged and can be queried. But you will have to specify a set of paths to look for. I don't know if directories are supported recursively.