本文整理了Java中org.apache.uima.util.FileUtils.deleteRecursive()
方法的一些代码示例,展示了FileUtils.deleteRecursive()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.deleteRecursive()
方法的具体详情如下:
包路径:org.apache.uima.util.FileUtils
类名称:FileUtils
方法名:deleteRecursive
[英]Recursively delete possibly non-empty directory or file.
[中]递归删除可能非空的目录或文件。
代码示例来源:origin: apache/uima-uimaj
/**
* Recursively delete possibly non-empty directory or file.
*
* @param file
* The file or directory to be deleted.
* @return <code>true</code> iff the file/directory could be deleted.
*/
public static final boolean deleteRecursive(File file) {
if (!file.exists()) {
return false;
}
boolean rc = true;
if (file.isDirectory()) {
File[] fileList = file.listFiles();
for (int i = 0; i < fileList.length; i++) {
rc &= deleteRecursive(fileList[i]);
}
}
rc &= file.delete();
return rc;
}
代码示例来源:origin: DigitalPebble/behemoth
public void close() throws IOException {
if (cas != null)
cas.release();
if (tae != null)
tae.destroy();
if (installDir != null) {
FileUtils.deleteRecursive(installDir);
}
}
代码示例来源:origin: dstl/baleen
@After
public void tearDown() throws IOException {
FileUtils.deleteRecursive(tempDirectory.toFile());
}
}
代码示例来源:origin: org.apache.uima/uimaj-v3migration-jcas
FileUtils.deleteRecursive(new File(outputDirectory));
代码示例来源:origin: apache/uima-uimaj
if (FileUtils.deleteRecursive(targetDir)) {
if (!targetDir.mkdirs()) {
代码示例来源:origin: apache/ctakes
FileUtils.deleteRecursive(modelsDir);
代码示例来源:origin: org.apache.ctakes/ctakes-assertion
FileUtils.deleteRecursive(modelsDir);
代码示例来源:origin: apache/ctakes
FileUtils.deleteRecursive(workingDir);
代码示例来源:origin: ClearTK/cleartk
FileUtils.deleteRecursive(cleanedTimeBankDir);
代码示例来源:origin: org.apache.ctakes/ctakes-coreference
FileUtils.deleteRecursive(workingDir);
内容来源于网络,如有侵权,请联系作者删除!