How to find XML files on a project's folder?
Is there a simple way to iterate over only the XML files on a project's folder? My goal is to change the body of the XML file by replacing
"<uses-permission android:name=\"com.android.vending.BILLING\" />";
with
"<uses-permission android:name=\"org.onepf.openiab.permission.BILLING\" />";
请先登录再写评论。
Do you want to do this from the plugin? I'm asking because this can be done without any plugins, just invoke 'Replace in Path' action and specify *.xml as file mask.
Yes, because my plugin also does other things (non-involving XML).
You can use
for that and filter xml files by comparing file.getFileType() with StdFileTypes.XML. This should be fast enough unless the project has several thousands of files.
Thank you for your help!
Can this be also done with a .AIDL file?