delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/08/27/11:37:13

Date: Mon, 27 Aug 2001 18:37:50 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "A. Sinan Unur" <asu1 AT cornell DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: file system change notification
In-Reply-To: <Xns9109B74F0D8A6ASINANUNUR@132.236.56.8>
Message-ID: <Pine.SUN.3.91.1010827183726.22538G@is>
MIME-Version: 1.0
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

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.)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019