Results 1 to 3 of 3

Thread: FileSystemWatcher Array - Ideas

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Location
    Dayton, OH USA
    Posts
    119

    Lightbulb FileSystemWatcher Array - Ideas

    I need to read in a config file or from a database multiple directories to watch\monitor with the FileSystemWatcher. The number of FileSystemWatchers that gets created will have to be dynamic when the app starts based on the amount of configs read in. My only thought is to somehow read in the settings, create an array of FileSystemWatchers and go from there.

    Does this sound like the correct way to approach this? Any other ideas, suggestions, or samples would be GREATLY appreciated.

  2. #2
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    Not sure how good/bad this would be performance wise, but it seems to me you only need one FileSystemWatcher per filesystem, so long as all the files you're monitoring for have some filename criteria (same extension, same first few letters of filename or something) you can watch for. Probably if you're working with a shared disk with many users hitting it at once this isn't the most desirable way to do it but I don't really know how much overhead it would take.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Location
    Dayton, OH USA
    Posts
    119
    Every config would be different, meaning each would have a different file system on a different server, etc. I think I would have to some how create multiple instances of the FileSystemWatcher for each unique config.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width