本文整理汇总了Java中org.eclipse.scada.utils.io.RecursiveDeleteVisitor类的典型用法代码示例。如果您正苦于以下问题:Java RecursiveDeleteVisitor类的具体用法?Java RecursiveDeleteVisitor怎么用?Java RecursiveDeleteVisitor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RecursiveDeleteVisitor类属于org.eclipse.scada.utils.io包,在下文中一共展示了RecursiveDeleteVisitor类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: process
import org.eclipse.scada.utils.io.RecursiveDeleteVisitor; //导入依赖的package包/类
@Override
protected AetherResult process ( final Context context, final ImportConfiguration cfg ) throws Exception
{
final Path tmpDir = Files.createTempDirectory ( "aether" );
try
{
return markExisting ( prepareDependencies ( tmpDir, cfg ), cfg, this.channelService );
}
catch ( final Exception e )
{
logger.warn ( "Failed to test", e );
throw e;
}
finally
{
Files.walkFileTree ( tmpDir, new RecursiveDeleteVisitor () );
Files.deleteIfExists ( tmpDir );
}
}
示例2: process
import org.eclipse.scada.utils.io.RecursiveDeleteVisitor; //导入依赖的package包/类
@Override
protected AetherResult process ( final Context context, final ImportConfiguration cfg ) throws Exception
{
final Path tmpDir = Files.createTempDirectory ( "aether" );
try
{
return preparePlain ( tmpDir, cfg );
}
catch ( final Exception e )
{
logger.warn ( "Failed to test", e );
throw e;
}
finally
{
Files.walkFileTree ( tmpDir, new RecursiveDeleteVisitor () );
Files.deleteIfExists ( tmpDir );
}
}
示例3: clear
import org.eclipse.scada.utils.io.RecursiveDeleteVisitor; //导入依赖的package包/类
@Override
public void clear () throws IOException
{
synchronized ( CacheStore.this )
{
// if we have a "next" dir
if ( this.tmp != null )
{
// delete it
Files.walkFileTree ( this.tmp, new RecursiveDeleteVisitor () );
}
// and ensure we always have one
makeTemp ();
}
}
示例4: rollback
import org.eclipse.scada.utils.io.RecursiveDeleteVisitor; //导入依赖的package包/类
@Override
public void rollback ()
{
synchronized ( CacheStore.this )
{
markFinished ( this );
if ( this.tmp == null )
{
return;
}
try
{
Files.walkFileTree ( this.tmp, new RecursiveDeleteVisitor () );
}
catch ( final IOException e )
{
throw new RuntimeException ( "Failed to roll back", e );
}
}
}
示例5: setup
import org.eclipse.scada.utils.io.RecursiveDeleteVisitor; //导入依赖的package包/类
@BeforeClass
public static void setup () throws IOException
{
basePath = Paths.get ( ".", "target", "test" ).toAbsolutePath ();
if ( Files.exists ( basePath ) )
{
Files.walkFileTree ( basePath, new RecursiveDeleteVisitor () );
}
}
示例6: setup
import org.eclipse.scada.utils.io.RecursiveDeleteVisitor; //导入依赖的package包/类
@BeforeClass
public static void setup () throws IOException
{
basePath = Paths.get ( "tests" );
if ( Files.exists ( basePath ) )
{
Files.walkFileTree ( basePath, new RecursiveDeleteVisitor () );
}
Files.createDirectories ( basePath );
}