I have a question is there a way, to have a functi...
# cfml-beginners
s
I have a question is there a way, to have a function and recurse a directory outside of that function project and find all elements of SVG and add aria-label to it from the <SVG icon property
a
How should a directory be recursed outside of a function? Don't understand the context of the question.
s
i mean the folder is from other directory
m
Please show the code you've attempted so we can have a better idea of how to help. Are you using
cfdirectory
? You should be able to just specify your folder in that call.
m
as long as the user cf is running under has permission to read/write to the directory, you could accomplish what I think it is you are asking. As far as the parsing/editing that I interpret you wanting to do, I would look at jsoup for that.
a
What the hell are you talking about?
😂 1
As per every time you ask an impossibly vague question: show us code that demonstrates the issue you are having.
m
sounds like they want to do a global search and replace in cf files. if so, an easy way is using something like notepad+ and then adding the attribute to the start of a tag.. ie: find <a and replace with <a attr="asdf"
why write code when you don't have to 🙂