Tuesday October 13th

Monday October 12th

Reusable generic Directory Poller utility class for .NET

Free reusable generic Directory Poller utility class for .NET


You've got to be joking. Are we back in the world of VB6??? Any time I hear the word "polling" shivers run up and down my spine.

FileSystemWatcher FTW!

Lack of RegEx support was why I skimmed over FileSystemWatcher to begin with.

I had a quick deadline on getting this functionality out for work and I didn't consider using FSW in the same manner. Indeed, it would be more efficient to re-write the code using FSW at the core.

Never coded in VB6, personally.

public class RegexFileSystemWatcher : FileSystemWatcher
public override OnFileSystemChangedLolWhatever(FileSystemChangedEventArgs e) { if(!MyRegexLol.Match(e.Filename)) return; base(e); }

I loev regex. I hate polling.

The vb6 ref comes from just about every VB 6 program I've ever seen polling something. Polling the filesystem, polling databases, polling poles... Yech.

I take the first part back. The fsw isn't designed to be extended. You'd have to wrap it instead. Pity.

I also forgot to mention that another reason I skimmed over FileSystemWatcher is because I wasn't just looking for the Creation of a file, I was looking for the EXISTENCE of a file.

This is more fail-safe for my needs. For instance, if the FSW wasn't running when the file was created, then the event wouldn't be triggered ever again. I was looking for something more fail safe.

Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network