private File getProjectDir ( String projectId , boolean create ) throws IOException { File projectDir = new File ( getKeenCacheDirectory ( ) , projectId ) ; if ( create && ! projectDir . exists ( ) ) { KeenLogging . log ( "Cache directory for project '" + projectId + "' doesn't exist. " + "Creating it." ) ; if ( ! projectDir . mkdirs ( ) ) { throw new IOException ( "Could not create project cache directory '" + projectDir . getAbsolutePath ( ) + "'" ) ; } } return projectDir ; }
Gets the cache directory for the given project . Optionally creates the directory if it doesn t exist .