Closed dantleech closed 9 years ago
for direct children, phpcr itself supports globbing
Yep: http://www.day.com/specs/jcr/2.0/5_Reading.html#5.2.2.1 Name Patterns
I think it would be relatively simple to implement something which expands paths containing globs, e.g. it should be possible to support:
PHPCRSH> ls /*/foo/*
PHPCRSH> rm *.txt
PHPCRSH> cp foo* foo/
We would just have to implement something which resolves a globbed path to an array of nodes.
The only implementation difficulty I can see is determining if a given path segment is a glob or not:
*
character then treat as a glob.i would only glob when there is an explicit *
. otherwise there are too
many ambiguities. * is not valid in a node name, or is it?
Also would be great to do something like:
PHPCRSH> ls /cmf/foobar/contents/articles/*/jcr:uuid
Closing in favor of PR #113
It would be great to support at least wildcards:
If not something more complete, I wonder if there are any libraries for this