T
Tom P.
I'm writing a file manager and I'm currently trying to deal with
changes to the file listing while monitoring the directory. I have a
FileSystemWatcher that will raise an event when the file system
changes. The problem with that is it still doesn't give me enough
information to determine what has happened. I also find it goes off
more than once in some conditions and doesn't go off at all in other
conditions, and it goes off early in yet different conditions.
My recourse is to create a FileSystemWatcher for each file in a
directory. That way each file entry can take care of itself when
something happens. But I don't know how resource-intensive that would
be, to have 150 - 300 FileSystemWatchers running at the same time.
I've also thought about making File-based caches for each entry and
then I can rebuild the entry when the cache expires.
Or I could make timers in each FileSystemListViewItem that poll the
file entry and refresh themselves. This would essentially be the same
as the FileSystemWatcher but it might be less resource-intensive.
Any ideas?
Tom P.
changes to the file listing while monitoring the directory. I have a
FileSystemWatcher that will raise an event when the file system
changes. The problem with that is it still doesn't give me enough
information to determine what has happened. I also find it goes off
more than once in some conditions and doesn't go off at all in other
conditions, and it goes off early in yet different conditions.
My recourse is to create a FileSystemWatcher for each file in a
directory. That way each file entry can take care of itself when
something happens. But I don't know how resource-intensive that would
be, to have 150 - 300 FileSystemWatchers running at the same time.
I've also thought about making File-based caches for each entry and
then I can rebuild the entry when the cache expires.
Or I could make timers in each FileSystemListViewItem that poll the
file entry and refresh themselves. This would essentially be the same
as the FileSystemWatcher but it might be less resource-intensive.
Any ideas?
Tom P.