So, I've got a working solution, but it's ugly and seems un-idiomatic. The problem is this:
For a directory tree, where every directory is set up to have:
- 1
.xc
file
- at least 1
.x
file
- any number of directories which follow the same format
and nothing else. I'd like to, given the root path and walk the tree applying xc()
to the contents of .xc
fies, x
to the contents to .x
files, and then doing the same thing to child folders' contents.
Actual code with explanation would be appreciated.
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…