| @@ -26,6 +26,7 @@ import org.apache.tools.ant.BuildException; | |||||
| import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
| import org.apache.tools.ant.types.Resource; | import org.apache.tools.ant.types.Resource; | ||||
| import org.apache.tools.ant.util.FileUtils; | import org.apache.tools.ant.util.FileUtils; | ||||
| import org.apache.tools.tar.TarConstants; | |||||
| import org.apache.tools.tar.TarEntry; | import org.apache.tools.tar.TarEntry; | ||||
| import org.apache.tools.tar.TarInputStream; | import org.apache.tools.tar.TarInputStream; | ||||
| @@ -39,6 +40,8 @@ public class TarResource extends ArchiveResource { | |||||
| private String groupName = ""; | private String groupName = ""; | ||||
| private long uid; | private long uid; | ||||
| private long gid; | private long gid; | ||||
| private byte linkFlag = TarConstants.LF_NORMAL; | |||||
| private String linkName = ""; | |||||
| /** | /** | ||||
| * Default constructor. | * Default constructor. | ||||
| @@ -172,6 +175,22 @@ public class TarResource extends ArchiveResource { | |||||
| return (int) getLongGid(); | return (int) getLongGid(); | ||||
| } | } | ||||
| /** | |||||
| * @return the link "name" (=path) of this entry; an empty string if this is no link | |||||
| * @since 1.10.10 | |||||
| */ | |||||
| public String getLinkName() { | |||||
| return linkName; | |||||
| } | |||||
| /** | |||||
| * @return the link "flag" (=type) of this entry | |||||
| * @since 1.10.10 | |||||
| */ | |||||
| public byte getLinkFlag() { | |||||
| return linkFlag; | |||||
| } | |||||
| /** | /** | ||||
| * fetches information from the named entry inside the archive. | * fetches information from the named entry inside the archive. | ||||
| */ | */ | ||||
| @@ -213,6 +232,8 @@ public class TarResource extends ArchiveResource { | |||||
| groupName = e.getGroupName(); | groupName = e.getGroupName(); | ||||
| uid = e.getLongUserId(); | uid = e.getLongUserId(); | ||||
| gid = e.getLongGroupId(); | gid = e.getLongGroupId(); | ||||
| linkName = e.getLinkName(); | |||||
| linkFlag = e.getLinkFlag(); | |||||
| } | } | ||||
| } | } | ||||