Closed ericcanadas closed 5 months ago
Can you send a usage example? How would you use it in the original type?
You can use the existing Filter property
/// <summary>
/// Gets or sets the filter string, used to determine what files are monitored in a directory.
/// </summary>
/// <value>The filter string. The default is "*.*" (Watches all files.)</value>
public string Filter
{
get
{
return _fileSystemWatcher.Filter;
}
set
{
_fileSystemWatcher.Filter = value;
}
}
Hi, I want to monitor multiple file extensions I see this thread in my search but your good implementation don't have this fonctionnality : https://stackoverflow.com/questions/6965184/how-to-set-filter-for-filesystemwatcher-for-multiple-file-types#answer-61145821
I see. Have you tried setting all the filters into the Filter
property?
Try watcher.Filter = "*.txt;*.csv"
If that doesn't work I will implement the Filters
Στάλθηκε από Outlook για Androidhttps://aka.ms/AAb9ysg
From: Eric CANADAS @.> Sent: Wednesday, April 10, 2024 10:37:03 AM To: melenaos/FileSystemSafeWatcher @.> Cc: melenaos @.>; Comment @.> Subject: Re: [melenaos/FileSystemSafeWatcher] Support of the new Filters parameters (Issue #6)
Hi, I want to monitor multiple file extensions I see this thread in my search but your good implementation don't have this fonctionnality : https://stackoverflow.com/questions/6965184/how-to-set-filter-for-filesystemwatcher-for-multiple-file-types#answer-61145821
— Reply to this email directly, view it on GitHubhttps://github.com/melenaos/FileSystemSafeWatcher/issues/6#issuecomment-2046745223, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABXJ2CCSPV2PQ3C7ZGFU6BDY4TTZ7AVCNFSM6AAAAABF6X3DHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBWG42DKMRSGM. You are receiving this because you commented.Message ID: @.***>
Yes, I tried this but it's not working !
You can get the new version now. I hope that helps!
Great ! It works like a charm ! ;-) Thanks for the responsiveness !!
Thanks for testing it!
It's possible to add the support of the new Filters parameter which allows to specify multiple extensions...