Package org.codehaus.plexus.archiver
Class ArchiveEntry
java.lang.Object
org.codehaus.plexus.archiver.ArchiveEntry
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ArchiveEntrycreateDirectoryEntry(String target, File file, int permissions, int defaultDirMode1) static ArchiveEntrycreateDirectoryEntry(String target, org.codehaus.plexus.components.io.resources.PlexusIoResource resource, int permissions, int defaultDirectoryPermissions) static ArchiveEntrycreateFileEntry(String target, File file, int permissions, int defaultDirectoryPermissions) static ArchiveEntrycreateFileEntry(String target, org.codehaus.plexus.components.io.resources.PlexusIoResource resource, int permissions, org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection collection, int defaultDirectoryPermissions) static ArchiveEntrycreateSymlinkEntry(String symlinkName, int permissions, String symlinkDestination, int defaultDirectoryPermissions) intgetFile()Deprecated.intgetMode()getName()org.codehaus.plexus.components.io.resources.PlexusIoResourceorg.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributesintgetType()voidsetResourceAttributes(org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes attributes) booleanIndicates if this entry should be added to the archive synchronously before adding the next entry and/or accessing the next entry ofResourceIterator.
-
Field Details
-
ROLE
-
FILE
public static final int FILE- See Also:
-
DIRECTORY
public static final int DIRECTORY- See Also:
-
SYMLINK
public static final int SYMLINK- See Also:
-
-
Method Details
-
getName
- Returns:
- the filename of this entry in the archive.
-
getFile
Deprecated.As of 1.0-alpha-10, file entries are no longer backed by files, but by instances ofPlexusIoResource. Consequently, you should usegetInputStream()-- Returns:
- The original file that will be stored in the archive.
-
getInputStream
- Returns:
- The resource contents.
- Throws:
IOException
-
getType
public int getType()- Returns:
- FILE or DIRECTORY
-
getMode
public int getMode()- Returns:
- octal user/group/other unix like permissions.
-
shouldAddSynchronously
public boolean shouldAddSynchronously()Indicates if this entry should be added to the archive synchronously before adding the next entry and/or accessing the next entry ofResourceIterator.- Returns:
trueif this entry should be added synchronously
-
createFileEntry
public static ArchiveEntry createFileEntry(String target, org.codehaus.plexus.components.io.resources.PlexusIoResource resource, int permissions, org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection collection, int defaultDirectoryPermissions) throws ArchiverException - Throws:
ArchiverException
-
createFileEntry
public static ArchiveEntry createFileEntry(String target, File file, int permissions, int defaultDirectoryPermissions) throws ArchiverException, IOException - Throws:
ArchiverExceptionIOException
-
createDirectoryEntry
public static ArchiveEntry createDirectoryEntry(String target, @Nonnull org.codehaus.plexus.components.io.resources.PlexusIoResource resource, int permissions, int defaultDirectoryPermissions) throws ArchiverException - Throws:
ArchiverException
-
createDirectoryEntry
public static ArchiveEntry createDirectoryEntry(String target, File file, int permissions, int defaultDirMode1) throws ArchiverException, IOException - Throws:
ArchiverExceptionIOException
-
createSymlinkEntry
public static ArchiveEntry createSymlinkEntry(String symlinkName, int permissions, String symlinkDestination, int defaultDirectoryPermissions) -
getResourceAttributes
public org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes getResourceAttributes() -
setResourceAttributes
public void setResourceAttributes(org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes attributes) -
getResource
-
getDefaultDirMode
public int getDefaultDirMode()
-
PlexusIoResource.