Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-122

add the ability to detect a symlink in a tar file

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2
    • Component/s: Archivers
    • Labels:
      None
    • Environment:

      all

      Description

      It is not currently posible to determine if an entry in a tar archive denotes a symbolic link or not; the only existing query mechanism is: isDirectory()

      I propose to add the following patch to:
      commons-compress-1.1-src/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java

      Thanks much in advance,

      — TarArchiveEntry.java.0 2010-10-27 13:30:58.669839000 -0700
      +++ TarArchiveEntry.java 2010-10-27 13:54:48.344231000 -0700
      @@ -594,6 +594,15 @@
      }

      /**
      + * Return whether or not this entry represents a symbolic link.
      + *
      + * @return True if this entry represents a symbolic link, false otherwise.
      + */
      + public boolean isSymbolicLink()

      { + return (linkFlag == LF_SYMLINK); + }

      +
      + /**

      • If this entry represents a file, and the file is a directory, return
      • an array of TarEntries for this entry's children.
        *

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              maxbirkoff Max Birkoff
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: