File Watcher + Win Service

M

Marcelo López

Hi all.
I'm developing a Windows Explorer like app.

I have my own repository to store the files and a bd where i keep the path
to each file.

I have to watch the repository all time to avoid modifications by other
people. So that, i'm using a win service in wich i implement a file watcher.

I have two basic questions:

1) I'm implementig methods to restore the information in the bd if someome
delete, rename or move a file in my repository. The problem i have is that
the file watcher
throws more than one event for example if someone moves a file. So, how can
i know which other events are waiting in the queue (and eventually how can i
acces and navigate to this queue) or is there another way to restore the
changes made to any file on my repository ??

2) My app also can modify the files in the repository, so, i don't want in
these case the file watcher perform the restore actions !! how can i differ
the changes made by my app or somebody else ?? is there any way to ask if my
app is running or something like that ??

Any suggestions are welcome !!

regards !!

Marcelo López
Inforcorp. Uruguay. Latin America.
 
M

Marcelo López

Thanks. It is interesting but itsn't what i'm looking for.
Like most of examples i have found about file watchers, this one only logs
information on every event that the file watcher raise the event.
I need the way to track events by group, to restore in a consistent way the
information in my bd. For example, if somebody moves a file from one dir to
another, the file watcher raises 4 events, and i can't solve them
separatily. I have to know which other events are next to the one i'm
analizing everytime,

Marcelo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top