-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FORGE-2308: Introduced ZipFileResourceEntry and extractTo method
- Loading branch information
Showing
4 changed files
with
165 additions
and
6 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
resources/api/src/main/java/org/jboss/forge/addon/resource/zip/ZipFileResourceEntry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Copyright 2015 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.addon.resource.zip; | ||
|
||
import org.jboss.forge.addon.resource.DirectoryResource; | ||
import org.jboss.forge.addon.resource.Resource; | ||
|
||
/** | ||
* A {@link Resource} that represents a ZipFileEntry | ||
* | ||
* @author <a href="mailto:ggastald@redhat.com">George Gastaldi</a> | ||
*/ | ||
public interface ZipFileResourceEntry extends Resource<String> | ||
{ | ||
/** | ||
* Unzip this {@link ZipFileResourceEntry} to the specified {@link DirectoryResource}. | ||
* | ||
* This method will extract the full path, including root folders from this {@link ZipFileResourceEntry} | ||
* | ||
* @param directoryResource the target directory | ||
*/ | ||
void extractTo(DirectoryResource directoryResource); | ||
|
||
/** | ||
* Unzip this {@link ZipFileResourceEntry} to the specified {@link DirectoryResource}. | ||
* | ||
* @param directoryResource the target directory | ||
* @param newName the new file name | ||
*/ | ||
void extractTo(DirectoryResource directoryResource, String newName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters