本文整理了Java中com.thinkaurelius.titan.util.system.IOUtils.deleteDirectory()
方法的一些代码示例,展示了IOUtils.deleteDirectory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IOUtils.deleteDirectory()
方法的具体详情如下:
包路径:com.thinkaurelius.titan.util.system.IOUtils
类名称:IOUtils
方法名:deleteDirectory
暂无
代码示例来源:origin: thinkaurelius/titan
static public boolean deleteFromDirectory(File path) {
return deleteDirectory(path, false);
}
代码示例来源:origin: thinkaurelius/titan
static public boolean deleteDirectory(File path, boolean includeDir) {
boolean success = true;
if (path.exists()) {
File[] files = path.listFiles();
for (int i = 0; i < files.length; i++) {
if (files[i].isDirectory()) {
success = deleteDirectory(files[i], true) && success;
} else {
success = files[i].delete() && success;
}
}
}
if (includeDir) success = path.delete() && success;
return success;
}
代码示例来源:origin: thinkaurelius/titan
/**
* Test {@link com.thinkaurelius.titan.example.GraphOfTheGodsFactory#create(String)}.
*/
@Test
public void testGraphOfTheGodsFactoryCreate() {
File bdbtmp = new File("target/gotgfactory");
IOUtils.deleteDirectory(bdbtmp, true);
TitanGraph gotg = GraphOfTheGodsFactory.create(bdbtmp.getPath());
TitanIndexTest.assertGraphOfTheGods(gotg);
gotg.close();
}
}
代码示例来源:origin: thinkaurelius/titan
@BeforeClass
public static void killElasticsearch() {
IOUtils.deleteDirectory(new File("es"), true);
ElasticsearchRunner esr = new ElasticsearchRunner();
esr.stop();
}
代码示例来源:origin: com.thinkaurelius.titan/titan-core
static public boolean deleteFromDirectory(File path) {
return deleteDirectory(path, false);
}
代码示例来源:origin: org.hawkular.titan/titan-core
static public boolean deleteFromDirectory(File path) {
return deleteDirectory(path, false);
}
代码示例来源:origin: org.hawkular.titan/titan-core
static public boolean deleteDirectory(File path, boolean includeDir) {
boolean success = true;
if (path.exists()) {
File[] files = path.listFiles();
for (int i = 0; i < files.length; i++) {
if (files[i].isDirectory()) {
success = deleteDirectory(files[i], true) && success;
} else {
success = files[i].delete() && success;
}
}
}
if (includeDir) success = path.delete() && success;
return success;
}
代码示例来源:origin: com.thinkaurelius.titan/titan-core
static public boolean deleteDirectory(File path, boolean includeDir) {
boolean success = true;
if (path.exists()) {
File[] files = path.listFiles();
for (int i = 0; i < files.length; i++) {
if (files[i].isDirectory()) {
success = deleteDirectory(files[i], true) && success;
} else {
success = files[i].delete() && success;
}
}
}
if (includeDir) success = path.delete() && success;
return success;
}
内容来源于网络,如有侵权,请联系作者删除!