本文整理了Java中org.agrona.IoUtil.delete()
方法的一些代码示例,展示了IoUtil.delete()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IoUtil.delete()
方法的具体详情如下:
包路径:org.agrona.IoUtil
类名称:IoUtil
方法名:delete
[英]Recursively delete a file or directory tree.
[中]递归删除文件或目录树。
代码示例来源:origin: real-logic/aeron
/**
* Delete the current Aeron directory, throwing errors if not possible.
*/
public void deleteAeronDirectory()
{
IoUtil.delete(aeronDirectory, false);
}
代码示例来源:origin: real-logic/aeron
/**
* Delete the cluster container directory.
*/
public void deleteDirectory()
{
if (null != clusterDir)
{
IoUtil.delete(clusterDir, false);
}
}
代码示例来源:origin: real-logic/aeron
/**
* Delete the cluster directory.
*/
public void deleteDirectory()
{
if (null != clusterDir)
{
IoUtil.delete(clusterDir, false);
}
}
代码示例来源:origin: real-logic/aeron
/**
* Delete the archive directory if the {@link #archiveDir()} value is not null.
*/
public void deleteArchiveDirectory()
{
if (null != archiveDir)
{
IoUtil.delete(archiveDir, false);
}
}
代码示例来源:origin: real-logic/agrona
public void deleteDirectory(final boolean ignoreFailures)
{
IoUtil.delete(parentDir, ignoreFailures);
}
代码示例来源:origin: real-logic/agrona
/**
* Create a directory, removing previous directory if it already exists.
* <p>
* Call callback if it does exist.
*
* @param directory the directory which definitely exists after this method call.
* @param descriptionLabel to associate with the directory for any exceptions and callback.
* @param callback to call if directory exists passing back absolute path and descriptionLabel.
*/
public static void ensureDirectoryIsRecreated(
final File directory, final String descriptionLabel, final BiConsumer<String, String> callback)
{
if (directory.exists())
{
delete(directory, false);
callback.accept(directory.getAbsolutePath(), descriptionLabel);
}
if (!directory.mkdirs())
{
throw new IllegalArgumentException("could not create " + descriptionLabel + " directory: " + directory);
}
}
代码示例来源:origin: real-logic/agrona
delete(f, ignoreFailures);
代码示例来源:origin: real-logic/aeron
@After
public void after()
{
IoUtil.delete(new File(TEMP_DIR, RecordingLog.RECORDING_LOG_FILE_NAME), ignoreMissingRecordingFile);
}
代码示例来源:origin: real-logic/aeron
@After
public void cleanupFiles()
{
IoUtil.delete(DATA_DIR, false);
}
代码示例来源:origin: real-logic/aeron
@After
public void after()
{
IoUtil.delete(archiveDir, false);
}
代码示例来源:origin: real-logic/aeron
@After
public void after()
{
IoUtil.delete(archiveDir, false);
}
代码示例来源:origin: real-logic/aeron
public static File makeTestDirectory()
{
final File archiveDir = new File(IoUtil.tmpDirName(), "archive-test");
if (archiveDir.exists())
{
System.err.println("Warning archive directory exists, deleting: " + archiveDir.getAbsolutePath());
IoUtil.delete(archiveDir, false);
}
if (!archiveDir.mkdirs())
{
throw new IllegalStateException("failed to make archive test directory: " + archiveDir.getAbsolutePath());
}
return archiveDir;
}
代码示例来源:origin: real-logic/aeron
@After
public void after()
{
CloseHelper.close(catalog);
IoUtil.delete(archiveDir, false);
}
代码示例来源:origin: real-logic/aeron
@After
public void after()
{
IoUtil.unmap(mockLogBufferMapped.byteBuffer());
CloseHelper.close(mockLogBufferChannel);
IoUtil.delete(archiveDir, false);
IoUtil.delete(termFile, false);
}
代码示例来源:origin: real-logic/aeron
@After
public void after()
{
CloseHelper.close(catalog);
IoUtil.delete(archiveDir, false);
}
代码示例来源:origin: real-logic/aeron
@After
public void after()
{
clientB.close();
clientA.close();
driverB.close();
driverA.close();
IoUtil.delete(new File(ROOT_DIR), true);
}
代码示例来源:origin: real-logic/aeron
@After
public void closeEverything()
{
CloseHelper.close(clientB);
CloseHelper.close(clientA);
CloseHelper.close(driverB);
CloseHelper.close(driverA);
IoUtil.delete(new File(ROOT_DIR), true);
}
代码示例来源:origin: real-logic/aeron
@After
public void closeEverything()
{
CloseHelper.close(publicationA);
CloseHelper.close(publicationB);
CloseHelper.close(subscription);
CloseHelper.close(clientA);
CloseHelper.close(driverA);
IoUtil.delete(new File(ROOT_DIR), true);
}
代码示例来源:origin: real-logic/aeron
@After
public void after()
{
CloseHelper.quietClose(clientC);
CloseHelper.quietClose(clientB);
CloseHelper.quietClose(clientA);
driverB.close();
driverA.close();
IoUtil.delete(new File(ROOT_DIR), false);
}
代码示例来源:origin: real-logic/aeron
@After
public void after()
{
publication.close();
subscriptionA.close();
subscriptionB.close();
clientB.close();
clientA.close();
driverB.close();
driverA.close();
IoUtil.delete(new File(ROOT_DIR), true);
}
内容来源于网络,如有侵权,请联系作者删除!