public static boolean deleteFile(File path) {
        if (path.isDirectory()) {
            File[] files = path.listFiles();
            for (File value : files) {
                if (value.isDirectory())
                    deleteFile(value);
                else
                    value.delete();
            }
        }
        return(path.delete());
    }
@author Ulf Lilleengen
@author Vegard Havdal
config-application-package/src/main/java/com/yahoo/config/model/application/provider/FilesApplicationFile.java