Gitiles
Code Review
Sign In
gerrit.opencord.org
/
xos
/
d84caefae90d7329ed5b71872782dceb08ba2edf
/
.
/
plstackapi
/
util
/
glob.py
blob: 833ce358c6166b271f37186a055875caa0c645d8 [
file
] [
log
] [
blame
]
import
os
,
fnmatch
def
recursive_glob
(
treeroot
,
pattern
):
results
=
[]
for
base
,
dirs
,
files
in
os
.
walk
(
treeroot
):
goodfiles
=
fnmatch
.
filter
(
files
,
pattern
)
results
.
extend
(
os
.
path
.
join
(
base
,
f
)
for
f
in
goodfiles
)
return
results