You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement a way to parse and list recursively where a single key can be matched to an arbitrary or predefined depth.
In a pattern like test/{nested}/foo allow both of the following to match:
paths= ['test/nest/one/two/foo',
'test/one/foo']
Example
pather.ls("C:/test/{nested@nest(1, -1)}")
We'd need to decide on a way to define the allowed nesting depth within the pattern and keep it readable at the same time. In the above example I was thinking the @ symbol could be separator where everything behind it is read as a registered "resolver" method in pather returning an (additional?) regex pattern that must be matched.
This syntax could easily grow complex and is very specific so I'd be happy to see and discuss better alternatives.
The text was updated successfully, but these errors were encountered:
Goal
Implement a way to parse and list recursively where a single key can be matched to an arbitrary or predefined depth.
In a pattern like
test/{nested}/foo
allow both of the following to match:Example
We'd need to decide on a way to define the allowed nesting depth within the pattern and keep it readable at the same time. In the above example I was thinking the
@
symbol could be separator where everything behind it is read as a registered "resolver" method in pather returning an (additional?) regex pattern that must be matched.This syntax could easily grow complex and is very specific so I'd be happy to see and discuss better alternatives.
The text was updated successfully, but these errors were encountered: