public static File getCurrentVersion ( File storeDirectory ) { File latestDir = getLatestDir ( storeDirectory ) ; if ( latestDir != null ) return latestDir ; File [ ] versionDirs = getVersionDirs ( storeDirectory ) ; if ( versionDirs == null || versionDirs . length == 0 ) { return null ; } else { return findKthVersionedDir ( versionDirs , versionDirs . length - 1 , versionDirs . length - 1 ) [ 0 ] ; } }
Retrieve the dir pointed to by latest symbolic - link or the current version dir