Article View: borland.public.jbuilder.java.api
Article #299Re: monitoring directory tree changes
From: gary
Date: Thu, 01 Jan 2004 03:08
Date: Thu, 01 Jan 2004 03:08
37 lines
2583 bytes
2583 bytes
shankar: thanks. you are right, of course, about the Windows API. i let myself get a bit too terse in my question, which was about performing a task in Java that i used to perform in C++ via the mentioned Windows API calls. This got contracted into a mention of non-existent "C++" calls. i guess your comment about the JNI wrapper is the "right" answer to my somewhat screwed up question. the utility i need is one that would only run on windows, because it is meant to support a 3rd-party program that only runs under windows. even so, i'd rather do it in a way that was more generic. in C, i'd probably just traverse directories doing stat() calls and looking at timestamps, but i don't know java enough to know its file system features yet, so i'll have to look into a rough equivalent to this C library call. thanks for your reply. Shankar Unni wrote: > gary wrote: > >> now, i'm wondering if there is a java API equivalent to the Visual C++ >> "FindFirstChangeNotification() / FindNextChangeNotification()", > > > This is not a "Visual C++", or even a "C++" feature - it's a Windows OS > feature. And no, there's nothing like that in Java. > > Java generally doesn't include features that are found only in a single > OS, and are extremely specific to that OS implementation (like the > Windows ChangeNotification APIs, etc.). > > If you really need to use extremely Windows-specific features, write a > JNI wrapper, and call that. Your program will then only run on Windows, > but that's apparently what you want, so that's OK..
Technical Details
Message-ID:
<3FF38F41.401@cordelli.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3FF24822.90104@cordelli.net> <3ff34c61$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,760bdf7d8953e8c9 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2003-12-31 19:35:32 PST Message-ID: <3FF38F41.401@cordelli.net> Date: Wed, 31 Dec 2003 22:08:49 -0500 From: gary <news@cordelli.net> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.api Subject: Re: monitoring directory tree changes References: <3FF24822.90104@cordelli.net> <3ff34c61$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 66.1.219.61 X-Trace: newsgroups.borland.com 1072926526 66.1.219.61 (31 Dec 2003 19:08:46 -0700) Lines: 38 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail