Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package fr.benjaminloison.patchoptimizationpng.main;
- import java.io.File;
- public class PatchOptimizationPNG
- {
- public static void main(String[] args)
- {
- clean(new File(new File("").getAbsolutePath() + File.separatorChar).list());
- }
- private static void clean(String[] files)
- {
- for(int i = 0; i < files.length; i++)
- {
- File file = new File(files[i]);
- String path = file.getAbsolutePath();
- if(file.isDirectory())
- {
- String pathFile = path + File.separatorChar, underFiles[] = new File(pathFile).list();
- for(int j = 0; j < underFiles.length; j++)
- underFiles[j] = pathFile + underFiles[j];
- clean(underFiles);
- }
- else if(path.contains("-min"))
- file.renameTo(new File(path.replace("-min", "")));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement