private static synchronized String getFile ( String name ) { if ( Objects . isNullOrEmpty ( baseDirectory ) ) { baseDirectory = Options . getStorage ( ) . getSystem ( "numberSequence.home" , System . getProperty ( "user.home" ) + File . separator + ".s1-sequences" ) ; } File dir = new File ( baseDirectory ) ; if ( ! dir . exists ( ) ) dir . mkdirs ( ) ; if ( ! dir . isDirectory ( ) ) throw new S1SystemError ( "Directory error: " + baseDirectory ) ; return dir . getAbsolutePath ( ) + File . separator + name ; }
Get file and ensure dir exists cache directory