public static boolean removeGrassRasterMap ( String mapsetPath , String mapName ) throws IOException { // list of files to remove String mappaths [ ] = filesOfRasterMap ( mapsetPath , mapName ) ; // first delete the list above, which are just files for ( int j = 0 ; j < mappaths . length ; j ++ ) { File filetoremove = new File ( mappaths [ j ] ) ; if ( filetoremove . exists ( ) ) { if ( ! FileUtilities . deleteFileOrDir ( filetoremove ) ) { return false ; } } } return true ; }
Given the mapsetpath and the mapname the map is removed with all its accessor files