All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zhangyue.we.anoprocesser.xml.Utils Maven / Gradle / Ivy

The newest version!
package com.zhangyue.we.anoprocesser.xml;

import java.io.File;

public class Utils {

    public static File findFileRecursive(File dir, String fileName) {
        File[] files = dir.listFiles();
        if (files != null) {
            for (File f : files) {
                if (f.isFile()) {
                    if (f.getName().equals(fileName)) {
                        return f;
                    }
                } else {
                    File temp = findFileRecursive(f, fileName);
                    if (temp != null && temp.getName().equals(fileName)) {
                        return temp;
                    }
                }
            }
        }
        return null;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy