DotNetKick.com is an open-source project. Please report any bugs and let us know your great suggestions. Currently running svn revision 620 (rss)

Kick Spy!, Kick Zeitgeist and Kick Widgets

12
kicks
published 5 months, 5 days ago, submitted by powerrush powerrush 5 months, 11 days ago

blog.troyd.net — Free reusable generic Directory Poller utility class for .NET

Add a comment 5 comments | category: | Views: 4 | Get KickIt image code
tags: , , | tag it

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:
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!
posted by yesthatmcgurk yesthatmcgurk 5 months, 5 days ago
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.
posted by powerrush powerrush 5 months, 5 days ago
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.
posted by yesthatmcgurk yesthatmcgurk 5 months, 5 days ago
I take the first part back. The fsw isn't designed to be extended. You'd have to wrap it instead. Pity.
posted by yesthatmcgurk yesthatmcgurk 5 months, 5 days ago
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.
posted by powerrush powerrush 5 months, 5 days ago



information Login or create an account to comment on this story
 

Sponsored Link: www.carlist.ie

Search:

Ads via The Lounge