public class ArchiveEntry
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
addSynchronously |
private org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes |
attributes |
private int |
defaultDirMode |
static int |
DIRECTORY |
static int |
FILE |
private int |
mode |
private java.lang.String |
name |
private org.codehaus.plexus.components.io.resources.PlexusIoResource |
resource |
static java.lang.String |
ROLE |
static int |
SYMLINK |
private int |
type |
Modifier | Constructor and Description |
---|---|
private |
ArchiveEntry(java.lang.String name,
org.codehaus.plexus.components.io.resources.PlexusIoResource resource,
int type,
int mode,
org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection collection,
int defaultDirMode) |
Modifier and Type | Method and Description |
---|---|
static ArchiveEntry |
createDirectoryEntry(java.lang.String target,
java.io.File file,
int permissions,
int defaultDirMode1) |
static ArchiveEntry |
createDirectoryEntry(java.lang.String target,
org.codehaus.plexus.components.io.resources.PlexusIoResource resource,
int permissions,
int defaultDirectoryPermissions) |
static ArchiveEntry |
createFileEntry(java.lang.String target,
java.io.File file,
int permissions,
int defaultDirectoryPermissions) |
static ArchiveEntry |
createFileEntry(java.lang.String target,
org.codehaus.plexus.components.io.resources.PlexusIoResource resource,
int permissions,
org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection collection,
int defaultDirectoryPermissions) |
static ArchiveEntry |
createSymlinkEntry(java.lang.String symlinkName,
int permissions,
java.lang.String symlinkDestination,
int defaultDirectoryPermissions) |
int |
getDefaultDirMode() |
java.io.File |
getFile()
Deprecated.
As of 1.0-alpha-10, file entries are no longer backed
by files, but by instances of
PlexusIoResource .
Consequently, you should use getInputStream() - |
java.io.InputStream |
getInputStream() |
int |
getMode() |
java.lang.String |
getName() |
org.codehaus.plexus.components.io.resources.PlexusIoResource |
getResource() |
org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes |
getResourceAttributes() |
int |
getType() |
void |
setResourceAttributes(org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes attributes) |
boolean |
shouldAddSynchronously()
Indicates if this entry should be added to the archive synchronously
before adding the next entry and/or accessing the next entry of
ResourceIterator . |
public static final java.lang.String ROLE
public static final int FILE
public static final int DIRECTORY
public static final int SYMLINK
@Nonnull private org.codehaus.plexus.components.io.resources.PlexusIoResource resource
private final java.lang.String name
private final int type
private final int mode
private final int defaultDirMode
private org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes attributes
private final boolean addSynchronously
private ArchiveEntry(java.lang.String name, @Nonnull org.codehaus.plexus.components.io.resources.PlexusIoResource resource, int type, int mode, org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection collection, int defaultDirMode)
name
- the filename as it will appear in the archive. This is platform-specific
normalized with File.separatorCharresource
- original filenametype
- FILE or DIRECTORYmode
- octal unix style permissionscollection
- defaultDirMode
- public java.lang.String getName()
@Deprecated public java.io.File getFile()
PlexusIoResource
.
Consequently, you should use getInputStream()
-public java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
public int getType()
public int getMode()
public boolean shouldAddSynchronously()
ResourceIterator
.true
if this entry should be added synchronouslypublic static ArchiveEntry createFileEntry(java.lang.String target, org.codehaus.plexus.components.io.resources.PlexusIoResource resource, int permissions, org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection collection, int defaultDirectoryPermissions) throws ArchiverException
ArchiverException
public static ArchiveEntry createFileEntry(java.lang.String target, java.io.File file, int permissions, int defaultDirectoryPermissions) throws ArchiverException, java.io.IOException
ArchiverException
java.io.IOException
public static ArchiveEntry createDirectoryEntry(java.lang.String target, @Nonnull org.codehaus.plexus.components.io.resources.PlexusIoResource resource, int permissions, int defaultDirectoryPermissions) throws ArchiverException
ArchiverException
public static ArchiveEntry createDirectoryEntry(java.lang.String target, java.io.File file, int permissions, int defaultDirMode1) throws ArchiverException, java.io.IOException
ArchiverException
java.io.IOException
public static ArchiveEntry createSymlinkEntry(java.lang.String symlinkName, int permissions, java.lang.String symlinkDestination, int defaultDirectoryPermissions)
public org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes getResourceAttributes()
public void setResourceAttributes(org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes attributes)
@Nonnull public org.codehaus.plexus.components.io.resources.PlexusIoResource getResource()
public int getDefaultDirMode()