private List < File > getUidFilesForProject ( String category , String projectName ) { // Check that the category directory exists File categoryDirectory = new File ( uidDirectory , category ) ; if ( ! categoryDirectory . exists ( ) || ( categoryDirectory . exists ( ) && categoryDirectory . isFile ( ) ) ) { return new ArrayList <> ( ) ; } // Check that the project directory exists File projectDirectory = new File ( categoryDirectory , projectName ) ; if ( ! projectDirectory . exists ( ) || ( projectDirectory . exists ( ) && projectDirectory . isFile ( ) ) ) { return new ArrayList <> ( ) ; } // Get all the version directories List < File > versionDirectories = new ArrayList <> ( ) ; for ( File electableDirectory : projectDirectory . listFiles ( ) ) { if ( electableDirectory . isDirectory ( ) ) { versionDirectories . add ( electableDirectory ) ; } } return versionDirectories ; }
Retrieve the list of the version directories for the project