public static int getLatestVersionNumber(File rootDirectory) throws IOException{
public static int getLatestVersionNumber(File rootDirectory) {
    public static int getLatestVersionNumber(File rootDirectory) throws IOException{        int result=-1;        if(isVersioned(rootDirectory)){            File[] files=rootDirectory.listFiles();            for(int i=0;i<files.length;i++){                int version=getVersionNumber(files[i].getName());                if(version>result){                    result=version;                }            }        }        return result;    }