private File getUidFile ( String category , String projectName , String projectVersion ) { // Check that the category directory exists File categoryDirectory = new File ( uidDirectory , category ) ; if ( categoryDirectory . exists ( ) && categoryDirectory . isFile ( ) ) { throw new IllegalArgumentException ( "The category file for the UID storage is not a directory" ) ; } else if ( ! categoryDirectory . exists ( ) ) { categoryDirectory . mkdir ( ) ; } // Check that the project directory exists File projectDirectory = new File ( categoryDirectory , projectName ) ; if ( projectDirectory . exists ( ) && projectDirectory . isFile ( ) ) { throw new IllegalArgumentException ( "The project file for the UID store is not a directory" ) ; } else if ( ! projectDirectory . exists ( ) ) { projectDirectory . mkdir ( ) ; } // Check that the version directory exists File versionDirectory = new File ( projectDirectory , projectVersion ) ; if ( versionDirectory . exists ( ) && versionDirectory . isFile ( ) ) { throw new IllegalArgumentException ( "The version file for the UID store is not a directory" ) ; } else if ( ! versionDirectory . exists ( ) ) { versionDirectory . mkdir ( ) ; } return new File ( versionDirectory , "latest" ) ; }
Get the UID file regarding the category project name and project version