Date: Mon, 27 Aug 2001 18:37:50 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "A. Sinan Unur" cc: djgpp AT delorie DOT com Subject: Re: file system change notification In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 26 Aug 2001, A. Sinan Unur wrote: > i would like to write a program that will watch a given directory (possibly > one that it was started in) for any file creation/deletion operations. > > I can do this in Windows using the code snippet included at the bottom of > this post. However, I would like to use djgpp. I am assuming there is no > similar API in the libraries, and hence I should chain some DOS interrupts. > (I could sit in a tight loop reading directory contents but I could miss > some creations/deletions if they happen rapidly). Alas, AFAIK there's no way for a DOS program to plug itself into the Windows file operations chain. I don't know about any functionality which could allow a DOS program to register a callback for file-oriented activities. You could, of course, write a VxD that would export such a service, but I doubt that you had that in mind when you asked your question. What exactly do you want to do in this program? That is, assuming you know some file was created or deleted, what would the program do with that info? (It's possible that the general problem cannot be solved with DJGPP, but some specific problem can.)