WildCard Key
- From: "Ben" <benm5678@xxxxxxxxx>
- Date: 18 Dec 2006 10:40:06 -0800
Hi,
I have a std::list that holds a list of disallowed filenames. So when
the client creates a file, the service checks if it's in this list and
if so, it deletes the file. Currently, it's fast and efficient, in a
second, I can check if the key (the filename) exists in the list and
act accordingly if so.
But I have a new need to support filenames based on wildcards. So the
list may contain notepad*.exe and is supposed to block anything that
matches.
Any ideas of an efficient way to do this ? The only way I can think of
now is to loop through the entire list and compare each value.... but
i'm afraid it'll really hurt performance, the list could be potentially
long.
Thanks for any tips!
Ben
.
- Follow-Ups:
- Re: WildCard Key
- From: Igor Tandetnik
- Re: WildCard Key
- From: David Lowndes
- Re: WildCard Key
- From: Brian Muth
- Re: WildCard Key
- Prev by Date: Re: std::unique
- Next by Date: Re: WildCard Key
- Previous by thread: Is std::deque<> effcient in accessing memory heap?
- Next by thread: Re: WildCard Key
- Index(es):
Relevant Pages
|