Linked by Rodney Holiman on Tue 15th Jun 2004 19:19 UTC
General Development There are times when a directory needs watched.  For reasons of its own, a program may need to know when a file is deleted, updated or renamed.  If .NET is involved, this is a trivial task.  Create an instance of the FileSystemWatcher; set some properties, and the task is completed.  If a non .NET solution is required (and regardless of the hype, some people haven't embraced .NET in all of its glory.), the ReadDirectoryChangesW function must be used, however the documentation for ReadDirectoryChangesW is sketchy at best.
E-mail Print r 0   · Read More · 16 Comment(s)
Order by: Score:
v A verb for English
by Mike on Tue 15th Jun 2004 19:36 UTC
v Why is it here ?
by Bischi on Tue 15th Jun 2004 19:48 UTC
v Re: I wonder
by Eugenia on Tue 15th Jun 2004 19:50 UTC
fam
by Anonymous on Tue 15th Jun 2004 20:08 UTC

I'd kinda like to see FAM supported in kernel on all platforms, especially for those that use gconf as it seems to make the biggest impact there on my OBSD system (no FAM) compared to my Gentoo system (FAM). Gnome-VFS (can) use(s) FAM, and frankly I like it from an app devellopment point of view.


http://oss.sgi.com/projects/fam/

v Delphi is dying
by Anonymous on Tue 15th Jun 2004 20:53 UTC
fam
by Ben A. on Tue 15th Jun 2004 21:09 UTC

I'd personally like to see Glib and GConf rot.

KDirWatch
by Sandy Dunlop on Tue 15th Jun 2004 21:13 UTC

KDE already does this, so I assume it should be fairly straightforward to do with Qt on Windows since there's now code available online...

http://developer.kde.org/documentation/library/cvs-api/kio/html/cla...

thanks
by APW on Tue 15th Jun 2004 22:57 UTC

I use Delphi all the time and really enjoy thoughtful articles like this. thanks.

v The .NET Crowd needs to get a Life !!!!
by Rick James on Wed 16th Jun 2004 00:13 UTC
RE: The .NET Crowd needs to get a Life !!!!
by Anonymous on Wed 16th Jun 2004 01:04 UTC


>
There are times when a directory needs watched. For reasons of its own, a program may need to know when a file is deleted, updated or renamed. If .NET is involved, this is a trivial task
>
>
There are hell of a lot of things .NET isn't good for and this is one of them.

Who in their right mind is going to let some crap running under .NET delete, update or rename any fricking files without their permission if they can help it?

And if they are going to give their permission why bother
running a .NET app to begin with?


......

I think that you should understand what you are reading before you post a comment. The article is about monitoring file system actions, not performing them.

Unfortunately...
by Kon on Wed 16th Jun 2004 03:54 UTC

Rick James is an idiot who does not have the intelligence to latch on to the fact that directory and file change monitoring is pretty much a standard mode of operation for many apps and background processes.

ReadDirectoryChangesW
by Brad Clarke on Wed 16th Jun 2004 04:15 UTC

"If a non .NET solution is required the ReadDirectoryChangesW function must be used"

That statement is false.

There are other Win 32 API calls that can accomplish the same thing (FindFirstChangeNotification).

Francois Piette wrote a Delphi component 7 years ago that accomplishes the same thing.

okay...?
by M on Wed 16th Jun 2004 07:19 UTC

If I knew I could get fairly random Delphi articles published on OSNews I would have written a few by now... LOL! Not clear how this is OS related as it is a pretty simple example and Windows centric... ah well.

RE: okay...?
by Anonymous on Wed 16th Jun 2004 09:08 UTC

Click on the gear-looking icon near the top of this article. That is the topic "development" topic. OSNews frequently posts news about this. You must be new here.

RE: okay...?
by M on Wed 16th Jun 2004 10:10 UTC

No.. I'm just a Delphi developer. This article is worrying me because this sort of stuff is Win32 101. This is "bread and butter" coding for me. It's not what I would class as something worthy of publishing here.

But, hey, who am I to complain about a Delphi article!!

This does much the same (though in C++... not exactly hard to convert to Delphi though):

http://www.relisoft.com/win32/watcher.html

RE: okay...?
by Eugenia on Wed 16th Jun 2004 20:40 UTC

>This article is worrying me because this sort of stuff is Win32 101

Yes, so???
Windows is an OS, right?