Is this possible - File System Watcher

68 views
Skip to first unread message

MichaelK

unread,
Jan 4, 2010, 9:38:39 AM1/4/10
to Dokan
Hello,

Very new to Dokan so any assistance will be greatly appreciated.

I would assume this is duable, but can the Dokan library watch a
specific folder and any time a sepcific file type is created or
modified have that file copied to a secondary folder for audits.

The .NET FileSystemWatcher almost works, but one problem is that its a
post process event. The file has already been created or saved and
depening on timing, the file could have already been deleted.
(Automated service moving files around). I would assume a file system
driver like Dokan would capture these changes at a lower level and
thus avoid the possibility of the file being deleted.

Thanks,
-Michael

Nicolás Iglesias

unread,
Jan 4, 2010, 10:38:08 AM1/4/10
to do...@googlegroups.com
Hi

Just attach your dokan driver to that specific folder and watch over the usual events (WriteFile,ReadFile,etc)... the rest, it's up to your imagination.

2010/1/4 MichaelK <mko...@gmail.com>

--

You received this message because you are subscribed to the Google Groups "Dokan" group.
To post to this group, send email to do...@googlegroups.com.
To unsubscribe from this group, send email to dokan+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dokan?hl=en.





--
Nicolas Iglesias.
cleverSIGHT, development evolved...

MichaelK

unread,
Jan 5, 2010, 2:19:24 PM1/5/10
to Dokan
Excuse my ignorance but from the few examples I have seen I have a few
questions.

1) Does it always create a drive letter when I use this library.
Ideally I don't want my watched folder to come up as say N Drive
2) Is there any best practices or guidance regarding unmounting. If my
application runs I was figuring I would mount on startup then unmount
on exit. Just want to make sure stopping and restarting application
multiple times is taken into account.


On Jan 4, 10:38 am, Nicolás Iglesias <n...@cleversight.com> wrote:
> Hi
>
> Just attach your dokan driver to that specific folder and watch over the
> usual events (WriteFile,ReadFile,etc)... the rest, it's up to your
> imagination.
>

> 2010/1/4 MichaelK <mkob...@gmail.com>


>
>
>
>
>
> > Hello,
>
> > Very new to Dokan so any assistance will be greatly appreciated.
>
> > I would assume this is duable, but can the Dokan library watch a
> > specific folder and any time a sepcific file type is created or
> > modified have that file copied to a secondary folder for audits.
>
> > The .NET FileSystemWatcher almost works, but one problem is that its a
> > post process event. The file has already been created or saved and
> > depening on timing, the file could have already been deleted.
> > (Automated service moving files around). I would assume a file system
> > driver like Dokan would capture these changes at a lower level and
> > thus avoid the possibility of the file being deleted.
>
> > Thanks,
> > -Michael
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Dokan" group.
> > To post to this group, send email to do...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > dokan+un...@googlegroups.com <dokan%2Bunsu...@googlegroups.com>.


> > For more options, visit this group at
> >http://groups.google.com/group/dokan?hl=en.
>
> --
> Nicolas Iglesias.

> cleverSIGHT, development evolved...- Hide quoted text -
>
> - Show quoted text -

Kevin Heeney

unread,
Jan 7, 2010, 11:40:19 PM1/7/10
to do...@googlegroups.com
Michael,
    I think you're on the right track in that dokan may be the only thing that could provide pre-change event notification, but I think you are on the wrong track in what dokan actually is.  Dokan provides a driver to framework interface which allows you to create new drives on Windows w/o doing the low-level driver coding.  Your dokan app responds to requests for data from these drives, allowing potential support for new file systems and folder structures from various data sources.  Windows FileSystemWatcher, as you mention, raises events after a change.  Dokan would be a viable solution for what you want because it would allow you to intercept calls via a mirror drive.  Dokan will always mount a new drive and apps built on dokan are responsible for supplying the needed information about that drive.  You can build a read/write mirror drive to intercept calls to those files, but it will not work on changes to the files at the source location, you would have to be editing the files on the mounted dokan drive.  If you want to catch changes to a file on say the C:\ drive before they happen, you cannot do this with dokan; and I can't think of an alternative solution.

Kevin



To unsubscribe from this group, send email to dokan+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages