[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Apply pattern-matching immediately beneath the stow director
From: |
Sergiu Ivanov |
Subject: |
Re: [PATCH] Apply pattern-matching immediately beneath the stow directory. |
Date: |
Wed, 9 Sep 2009 00:28:28 +0300 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Hello,
On Tue, Sep 08, 2009 at 01:55:41PM +0200, Carl Fredrik Hammar wrote:
> On Mon, Sep 07, 2009 at 11:24:48PM +0300, Sergiu Ivanov wrote:
>
> > Do you have some general idea of how multi-component pattern matching
> > could be implemented more efficiently than that? Some vague pointer
> > should suffice for me to adapt the idea to unionfs.
>
> How about matching one component at a time?
>
> For instance, given `*/*/*' you iterate through all files in the
> current directory and find matches to `*/' (the slash filters out
> non-directories). For each match you recurse, making the match the
> current directory and with the pattern with the tested component removed,
> e.g. `*/*'. The recursion continues until the pattern is static or
> there are no matches.
>
> (Clarification: by current directory I don't mean the process' CWD,
> just the directory currently being iterated.)
That's exactly what I was talking about. (Though I forgot to mention
some details you have mentioned.) I just wanted to say that it is not
really efficient.
But, as I've said in another mail, I guess I should think about
efficiency differently in this case. My initial goal was to just
modify the target of pattern-matching a bit. I guess the extending
the functionality would be okay.
Regards,
scolobb
P.S. Sorry for eventual bad sentence formulation in this and other
letters I've posted recently: it's late here and I need to answer the
mails today, since I'm leaving tomorrow, as I have already announced.
- Re: [PATCH] Apply pattern-matching immediately beneath the stow directory., olafBuddenhagen, 2009/09/07
- Re: [PATCH] Apply pattern-matching immediately beneath the stow directory., Sergiu Ivanov, 2009/09/07
- Re: [PATCH] Apply pattern-matching immediately beneath the stow directory., Carl Fredrik Hammar, 2009/09/08
- Re: [PATCH] Apply pattern-matching immediately beneath the stow directory.,
Sergiu Ivanov <=
- Re: [PATCH] Apply pattern-matching immediately beneath the stow directory., Carl Fredrik Hammar, 2009/09/09
- Re: [PATCH] Apply pattern-matching immediately beneath the stow directory., Sergiu Ivanov, 2009/09/13
- Re: [PATCH] Apply pattern-matching immediately beneath the stow directory., olafBuddenhagen, 2009/09/23
- Re: [PATCH] Apply pattern-matching immediately beneath the stow directory., Sergiu Ivanov, 2009/09/23