本文整理了Java中org.esa.snap.core.util.io.FileUtils.deleteTree()
方法的一些代码示例,展示了FileUtils.deleteTree()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.deleteTree()
方法的具体详情如下:
包路径:org.esa.snap.core.util.io.FileUtils
类名称:FileUtils
方法名:deleteTree
暂无
代码示例来源:origin: senbox-org/s2tbx
@Override
public void close() {
if (extractDir != null) {
FileUtils.deleteTree(extractDir);
extractDir = null;
}
}
代码示例来源:origin: senbox-org/s2tbx
@Override
public void dispose() {
super.dispose();
this.tiles.values().forEach(FileLandCoverTile::dispose);
this.tiles.clear();
this.unpackedDirs.forEach(f -> {
try {
FileUtils.deleteTree(f);
} catch (Exception ex) {
SystemUtils.LOG.warning(ex.getMessage());
}
});
this.unpackedDirs.clear();
}
代码示例来源:origin: senbox-org/s2tbx
private void deleteTemporaryFolder() {
boolean deleted = FileUtils.deleteTree(this.temporaryFolder.toFile());
if (logger.isLoggable(Level.FINE)) {
logger.log(Level.FINE, ""); // add an empty line
if (deleted) {
logger.log(Level.FINE, "Successfully deleted the temporary folder path '" + getTemporaryFolderPath()+"'");
} else {
logger.log(Level.FINE, "Failed to delete the temporary folder path '" + getTemporaryFolderPath()+"'");
}
}
}
代码示例来源:origin: senbox-org/s2tbx
public Path runTilesInParallel(int threadCount, Executor threadPool) throws Exception {
long startTime = System.currentTimeMillis();
if (logger.isLoggable(Level.FINE)) {
logger.log(Level.FINE, ""); // add an empty line
logger.log(Level.FINE, "Start writing the product bands into local disk files: source product: '"+this.sourceProduct.getName()+"', image width: "+getImageWidth()+", image height: "+getImageHeight() + ", start time: " + new Date(startTime));
logger.log(Level.FINE, "Temporary folder path to store the binary files: '" + this.temporaryFolder.toFile().getAbsolutePath()+"'");
}
boolean success = false;
try {
super.executeInParallel(threadCount, threadPool);
success = true;
} finally {
if (!success) {
// failed to copy the data and delete the folder
FileUtils.deleteTree(this.temporaryFolder.toFile());
}
}
if (logger.isLoggable(Level.FINE)) {
long finishTime = System.currentTimeMillis();
long totalSeconds = (finishTime - startTime) / 1000;
logger.log(Level.FINE, ""); // add an empty line
logger.log(Level.FINE, "Finish writing product bands into local disk files: source product: '"+this.sourceProduct.getName()+"', image width: "+getImageWidth()+", image height: "+getImageHeight()+", total seconds: "+totalSeconds+", finish time: "+new Date(finishTime));
}
return this.temporaryFolder;
}
}
代码示例来源:origin: senbox-org/snap-desktop
@AfterClass
public static void tearDown() throws Exception {
FileUtils.deleteTree(tempDir);
}
代码示例来源:origin: senbox-org/s2tbx
} finally {
this.threadPool.shutdown();
FileUtils.deleteTree(temporaryFolder.toFile());
内容来源于网络,如有侵权,请联系作者删除!