private boolean checkStructure ( ) { File ds ; ds = new File ( mapsetPath + File . separator + GrassLegacyConstans . CATS + File . separator ) ; if ( ! ds . exists ( ) ) if ( ! ds . mkdir ( ) ) return false ; ds = new File ( mapsetPath + File . separator + GrassLegacyConstans . CELL + File . separator ) ; if ( ! ds . exists ( ) ) if ( ! ds . mkdir ( ) ) return false ; ds = new File ( mapsetPath + File . separator + GrassLegacyConstans . CELL_MISC + File . separator ) ; if ( ! ds . exists ( ) ) if ( ! ds . mkdir ( ) ) return false ; ds = new File ( mapsetPath + File . separator + GrassLegacyConstans . CELL_MISC + File . separator + name ) ; if ( ! ds . exists ( ) ) if ( ! ds . mkdir ( ) ) return false ; ds = new File ( mapsetPath + File . separator + GrassLegacyConstans . FCELL + File . separator ) ; if ( ! ds . exists ( ) ) if ( ! ds . mkdir ( ) ) return false ; ds = new File ( mapsetPath + File . separator + GrassLegacyConstans . CELLHD + File . separator ) ; if ( ! ds . exists ( ) ) if ( ! ds . mkdir ( ) ) return false ; ds = new File ( mapsetPath + File . separator + GrassLegacyConstans . COLR + File . separator ) ; if ( ! ds . exists ( ) ) if ( ! ds . mkdir ( ) ) return false ; ds = new File ( mapsetPath + File . separator + GrassLegacyConstans . HIST + File . separator ) ; if ( ! ds . exists ( ) ) if ( ! ds . mkdir ( ) ) return false ; return true ; }
check if the needed folders are there ( they could be missing if the mapset has just been created and this is the first file that gets into it