![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Re: Filesystem Notification
On Apr 7, 3:48*pm, vivekian <vivekase...@gmail.com> wrote:
> Hi, > > Writing a small application which requires the application to be > informed when the *content / filename / location of a particular file > changes. Is there a Win32 class available which does this ? > > Thanks in advance, > vivekian Hi, You can use the following API to retrieve information that describes the changes within the specified directory: ReadDirectoryChangesW() http://msdn2.microsoft.com/en-us/lib...65(VS.85).aspx Kellie. |
|
|||
|
Re: Filesystem Notification
"Kellie Fitton" <KELLIEFITTON@yahoo.com> wrote in message
news:60ab34b1-ef43-4c37-b1bb-9579e052bbe3@a5g2000prg.googlegroups.com... On Apr 7, 3:48 pm, vivekian <vivekase...@gmail.com> wrote: > Hi, > > Writing a small application which requires the application to be > informed when the content / filename / location of a particular file > changes. Is there a Win32 class available which does this ? > > Thanks in advance, > vivekian Take a look at the FindFirstChangeNotification API. In the MSDN library, the path is Win32 and COM Development -> System Services -> File Services -> File Systems ->Directory Management -> Using Directory Management -> Obtaining Directory Change Notifications. If you are coding in dotNet, take a look at the System.IO.FileSystemWatcher class which is a wrapper for the FindFirstChangeNotification API functions. Mike. |
|
|||
|
Re: Filesystem Notification
Hello!
You wrote on Mon, 7 Apr 2008 15:48:19 -0700 (PDT): v> Writing a small application which requires the application to be v> informed when the content / filename / location of a particular file v> changes. Is there a Win32 class available which does this ? You can try FindFirstChangeNotification API as mentioned, but it seems that it won't be enough for your task as it won't give you information that your file has been moved or renamed. You can check CallbackFilter ( http://www.eldos.com/cbflt/ ) that would let you track file system events in real-time and give complete control over the events. With best regards, Eugene Mayevski http://mayevski.blogspot.com/ |
|
|||
|
Re: Filesystem Notification
On Apr 8, 9:52*am, "Eugene Mayevski" <mayev...@eldos.com> wrote:
> Hello! > You wrote *on Mon, 7 Apr 2008 15:48:19 -0700 (PDT): > > *v> Writing a small application which requires the application to be > *v> informed when the *content / filename / location of a particular file > *v> changes. Is there aWin32class available which does this ? > > You can try FindFirstChangeNotification API as mentioned, but it seems that > it won't be enough for your task as it won't give you information that your > file has been moved or renamed. > You can check CallbackFilter (http://www.eldos.com/cbflt/) that would let > you track file system events in real-time and give complete control over the > events. > > With best regards, > Eugene Mayevskihttp://mayevski.blogspot.com/ Thanks a bunch for all the pointers !! |
|
|||
|
Re: Filesystem Notification
On 8 avr, 16:52, "Eugene Mayevski" <mayev...@eldos.com> wrote:
> You can try FindFirstChangeNotification API as mentioned, but it seems that > it won't be enough for your task as it won't give you information that your > file has been moved or renamed. > You can check CallbackFilter (http://www.eldos.com/cbflt/) that would let > you track file system events in real-time and give complete control over the > events. SHChangeNotifyRegister() does this... |
|
|||
|
Re: Filesystem Notification
Hello!
You wrote on Tue, 8 Apr 2008 08:10:24 -0700 (PDT): CA> SHChangeNotifyRegister() does this... "This function is available through Microsoft Windows XP Service Pack 2 (SP2) and Windows Server 2003" Also, this gives only notification and not control. With best regards, Eugene Mayevski http://mayevski.blogspot.com/ |
|
|||
|
Re: Filesystem Notification
On 8 avr, 17:35, "Eugene Mayevski" <mayev...@eldos.com> wrote:
> Hello! > You wrote *on Tue, 8 Apr 2008 08:10:24 -0700 (PDT): > > *CA> SHChangeNotifyRegister() does this... > > "This function is available through Microsoft Windows XP Service Pack 2 > (SP2) and Windows Server 2003" It's available since NT4 (dynamic call), but was not documented before... |
|
|||
|
Re: Filesystem Notification
On Apr 7, 7:45 pm, "Michael D. Ober" <obermd.@.alum.mit.edu.nospam.>
wrote: > "Kellie Fitton" <KELLIEFIT...@yahoo.com> wrote in message > > news:60ab34b1-ef43-4c37-b1bb-9579e052bbe3@a5g2000prg.googlegroups.com... > On Apr 7, 3:48 pm, vivekian <vivekase...@gmail.com> wrote: > > > Hi, > > > Writing a small application which requires the application to be > > informed when the content / filename / location of a particular file > > changes. Is there a Win32 class available which does this ? > > > Thanks in advance, > > vivekian > > Take a look at the FindFirstChangeNotification API. In the MSDN library, > the path is Win32 and COM Development -> System Services -> File Services -> > File Systems ->Directory Management -> Using Directory Management -> > Obtaining Directory Change Notifications. If you are coding in dotNet, take > a look at the System.IO.FileSystemWatcher class which is a wrapper for the > FindFirstChangeNotification API functions. > > Mike. I imagine coding in dotNet would require the .NET platform to become a prerequisite for the application ? ~vivekian |
|
|||
|
Re: Filesystem Notification
"vivekian" <vivekaseeja@gmail.com> wrote in message
news:f4e4bced-805c-4dc4-a00e-4e8e533b04a4@u36g2000prf.googlegroups.com... > On Apr 7, 7:45 pm, "Michael D. Ober" <obermd.@.alum.mit.edu.nospam.> > wrote: >> "Kellie Fitton" <KELLIEFIT...@yahoo.com> wrote in message >> >> news:60ab34b1-ef43-4c37-b1bb-9579e052bbe3@a5g2000prg.googlegroups.com... >> On Apr 7, 3:48 pm, vivekian <vivekase...@gmail.com> wrote: >> >> > Hi, >> >> > Writing a small application which requires the application to be >> > informed when the content / filename / location of a particular file >> > changes. Is there a Win32 class available which does this ? >> >> > Thanks in advance, >> > vivekian >> >> Take a look at the FindFirstChangeNotification API. In the MSDN library, >> the path is Win32 and COM Development -> System Services -> File >> Services -> >> File Systems ->Directory Management -> Using Directory Management -> >> Obtaining Directory Change Notifications. If you are coding in dotNet, >> take >> a look at the System.IO.FileSystemWatcher class which is a wrapper for >> the >> FindFirstChangeNotification API functions. >> >> Mike. > > I imagine coding in dotNet would require the .NET platform to become a > prerequisite for the application ? > True, which is why I listed both methods. The question of monitoring the file system appears periodically in the dotnet programming groups as well. Your post wasn't clear what your development environment was. Also, the FindFirstChangeNotification supports renames, creates, closes, changes, and deletes. The one drawback is that the file system must be on an NT4 or Windows 95 or later system. Samba doesn't support this API. Mike. Mike. |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|