Example usage for org.apache.commons.vfs2 FileObject deleteAll

List of usage examples for org.apache.commons.vfs2 FileObject deleteAll

Introduction

In this page you can find the example usage for org.apache.commons.vfs2 FileObject deleteAll.

Prototype

int deleteAll() throws FileSystemException;

Source Link

Document

Deletes this file and all children.

Usage

From source file:org.pentaho.metaverse.impl.VfsLineageWriter.java

/**
 * Method called on the writer to do any cleanup of the output artifacts, folders, etc.
 *///  www.j  ava2s.  c o m
@Override
public void cleanOutput(LineageHolder holder) {
    String folderName = "unknown";
    try {
        FileObject folder = getOutputDirectoryAsFile(holder);
        folderName = folder.getName().getPath();
        folder.deleteAll();
    } catch (IOException ioe) {
        log.error(Messages.getErrorString("ERROR.CouldNotDeleteFile", folderName), ioe);
    }
}