question: private boolean openForWriting ( ) { File root = new File ( Properties . CTG_DIR ) ; if ( root . exists ( ) ) { if ( root . isDirectory ( ) ) { if ( ! root . canWrite ( ) ) { logger . error ( "Cannot write in " + root . getAbsolutePath ( ) ) ; return false ; } } else { boolean deleted = root . delete ( ) ; if ( ! deleted ) { logger . error ( "Folder " + root + " is a file, and failed to delete it" ) ; return false ; } else { if ( ! root . mkdirs ( ) ) { logger . error ( "Failed to mkdir " + root . getAbsolutePath ( ) ) ; return false ; } } } } else { if ( ! root . mkdirs ( ) ) { logger . error ( "Failed to mkdir " + root . getAbsolutePath ( ) ) ; return false ; } } File testsFolder = getBestTestFolder ( ) ; if ( ! testsFolder . exists ( ) ) { if ( ! testsFolder . mkdirs ( ) ) { logger . error ( "Failed to mkdir " + testsFolder . getAbsolutePath ( ) ) ; return false ; } } File seedFolder = getSeedInFolder ( ) ; if ( ! seedFolder . exists ( ) ) { if ( ! seedFolder . mkdirs ( ) ) { logger . error ( "Failed to mkdir " + seedFolder . getAbsolutePath ( ) ) ; } } return true ; }
target:  Open connection to Storage Manager Note: Here we just make sure we can write on disk