Skip to content

Commit

Permalink
Add javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
decebals committed Apr 13, 2019
1 parent 44ed78f commit 6b92361
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pf4j/src/main/java/org/pf4j/util/Unzip.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,14 @@ public void setDestination(File destination) {
this.destination = destination;
}

/**
* Extract the content of zip file ({@code source}) to destination directory.
* If destination directory already exists it will be deleted before.
*/
public void extract() throws IOException {
log.debug("Extract content of '{}' to '{}'", source, destination);

// delete destination file if exists
// delete destination directory if exists
if (destination.exists() && destination.isDirectory()) {
FileUtils.delete(destination.toPath());
}
Expand Down

0 comments on commit 6b92361

Please sign in to comment.