Revision 47295 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial/org.gvsig.h2spatial.h2gis132/org.gvsig.h2spatial.h2gis132.provider/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialUtils.java
H2SpatialUtils.java | ||
---|---|---|
3 | 3 |
import java.io.File; |
4 | 4 |
import java.sql.SQLException; |
5 | 5 |
import java.text.MessageFormat; |
6 |
import org.apache.commons.io.FileUtils; |
|
6 | 7 |
import org.apache.commons.io.FilenameUtils; |
7 | 8 |
import org.apache.commons.lang3.StringUtils; |
8 | 9 |
import static org.gvsig.fmap.dal.store.h2.H2SpatialHelper.LOGGER; |
... | ... | |
45 | 46 |
return false; |
46 | 47 |
} |
47 | 48 |
|
49 |
public static boolean removeH2db(File f) { |
|
50 |
try { |
|
51 |
File[] files = getH2Files(f); |
|
52 |
for (File file : files) { |
|
53 |
if( file.exists() ) { |
|
54 |
FileUtils.delete(file); |
|
55 |
} |
|
56 |
} |
|
57 |
} catch(Throwable t) { |
|
58 |
return false; |
|
59 |
} |
|
60 |
return true; |
|
61 |
} |
|
62 |
|
|
48 | 63 |
public static File normalizeH2File(File f) { |
49 | 64 |
if( f==null ) { |
50 | 65 |
return null; |
Also available in: Unified diff