public static long getLastCommitGeneration(Directory directory) throws IOException {return getLastCommitGeneration(directory.listAll());}

public static long GetLastCommitGeneration(Directory directory){try{return GetLastCommitGeneration(directory.ListAll());}catch (DirectoryNotFoundException){return -1;}}
