try
{
File dir = getMetadataDirectory( repositoryId, facetId );
- if ( !Files.deleteIfExists( dir.toPath() ) )
- {
- log.error( "Cannot delete the metadata repository {}", dir );
- }
+ FileUtils.deleteDirectory( dir );
}
catch ( IOException e )
{
try
{
File dir = new File( getMetadataDirectory( repoId, facetId ), name );
- if ( !Files.deleteIfExists( dir.toPath() ) )
- {
- log.error( "Cannot delete the metadata repository {}", dir );
- }
+ FileUtils.deleteDirectory( dir );
}
catch ( IOException e )
{
}
}
- Files.deleteIfExists( directory.toPath() );
+ FileUtils.deleteDirectory( directory );
//writeProperties( properties, directory, PROJECT_VERSION_METADATA_KEY );
}
catch ( IOException e )
try
{
File dir = getDirectory( repoId );
- if ( !Files.deleteIfExists( dir.toPath() ) )
- {
- log.error( "Cannot delete repository {}", dir );
- }
+ FileUtils.deleteDirectory( dir );
}
catch ( IOException e )
{
try
{
File directory = new File( getDirectory( repositoryId ), namespace + "/" + projectId );
- Files.deleteIfExists( directory.toPath() );
+ FileUtils.deleteDirectory( directory );
}
catch ( IOException e )
{
try
{
File directory = new File( getDirectory( repoId ), namespace + "/" + projectId + "/" + projectVersion );
- Files.deleteIfExists( directory.toPath() );
+ FileUtils.deleteDirectory( directory );
}
catch ( IOException e )
{