Re: Checking for Modification to a Set of Files
- From: Ben Bacarisse <ben.usenet@xxxxxxxxx>
- Date: Sat, 25 Mar 2006 01:02:57 +0000
On Fri, 24 Mar 2006 22:08:30 +0000, Randy Howard wrote:
ArkGunSlinger@xxxxxxxxxxx wrote
(in article
<1143208838.990512.289910@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>):
Logan Shaw wrote
I'm not a Dot Net expert, but from the name of the function (or
class or facility or whatever it is), I am assuming this is one
of those systems where you can request to be automatically
notified when certain changes to the filesystem take place.
That means without polling. Which would mean that, while it's
not portable, it is technically superior to anything that would
be completely portable.
Yep!
Randy Howard wrote
Because it isn't standard. If I have a choice between using
SomeWindowsApiMagicCrapThatTakesFourhundredArguments()
Au Contraire! my friend, System.IO.FileSystemWatcher is part of the Dot
Net framework
not some "APIMagicCrap" and would be the standard for windows
programming for this particular
function.
It's "APIMAgicCrap" from here, because I am running OS X. Be
sure and tell me how to get it to run on it. Same for my Linux
box, my FreeBSD system, and my Novell NetWare server.
I think partisan feelings are getting in the way of the facts here. For
any sufficiently diverse set of systems, a portable solution will be hard
to write and will probably have to use methods that are inferior to asking
the host system for file modification events (as others have pointed out).
For all its faults, .NET is supposed to provide a unified API for
services such as these, and implementations (some of them open) are
available for: Linux, Mac OS X, Solaris, BSD (Open, Free and Net flavours)
as well as... Microsoft Windows. You may be out of luck with Novell's
NetWare, but given their interest in Mono (the open-source .NET port) you
never know.
Mono supports the FileSystemWatcher interface so if all the OP needs is a
solution that runs on Windows, Linux, OS X, Solaris and BSD then it is a
pretty good choice. I don't like it but, that is the how it is!
<example using C# .NET bindings snipped>
Can you post a link to the free download for OS X please?
http://www.mono-project.com/Mono:OSX
I don't know Macs so it is possible that this is not suitable for a wide
range of systems.
--
Ben.
.
- Follow-Ups:
- Re: Checking for Modification to a Set of Files
- From: Randy Howard
- Re: Checking for Modification to a Set of Files
- From: ArkGunSlingler
- Re: Checking for Modification to a Set of Files
- References:
- Checking for Modification to a Set of Files
- From: mwmiller314
- Re: Checking for Modification to a Set of Files
- From: CBFalconer
- Re: Checking for Modification to a Set of Files
- From: crouch_dave
- Re: Checking for Modification to a Set of Files
- From: Randy Howard
- Re: Checking for Modification to a Set of Files
- From: Logan Shaw
- Re: Checking for Modification to a Set of Files
- From: ArkGunSlinger
- Re: Checking for Modification to a Set of Files
- From: Randy Howard
- Checking for Modification to a Set of Files
- Prev by Date: Re: find a number
- Next by Date: Re: find a number
- Previous by thread: Re: Checking for Modification to a Set of Files
- Next by thread: Re: Checking for Modification to a Set of Files
- Index(es):
Relevant Pages
|