Re: Checking for Modification to a Set of Files



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



Relevant Pages

  • Re: A cross-platform vision for Delphi
    ... "No, Microsoft does not support the Mono product, nor has it licensed ... a hedge/plan B in case Windows starts to lose marketshare. ... MONO apps written on Linux work on both. ...
    (borland.public.delphi.non-technical)
  • Re: :NET/C# GUI portability to Linux
    ... > Which is the best way to get it running under Linux? ... > I read about Mono, would this be a reliable way? ... > available for Windows and also for Linux. ... if this would be the most reliable solution. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [OT] C# Learning Resources
    ... it compiles C# to the .NET execution environment. ... Mono.NET is primarily a .NET runtime for Linux, to allow Linux users to run .NET programs. ... Last time I played with Mono, which was several years ago, there were severe limitations with what you could do with it. ... For example, Microsoft's official class library includes GUI stuff for making windows, with textbox and buttons and stuff. ...
    (comp.lang.cobol)
  • Re: Wild speculations about the "other" factors
    ... but being behind on Linux vs. being behind on Windows is ... future where Mono /did/ become established on Linux in the ... I think they continue to support these technologies as needed/desired ...
    (borland.public.delphi.non-technical)
  • Re: I guess I see why Linux hasnt taken off....
    ... People are comfortable with Windows. ... They want Linux to act like Windows. ... Norton Internet Security - $69 ... no other software needed that isn't a free download! ...
    (alt.os.linux.suse)