Interface HardLinkIdentitySupplier

  • All Known Implementing Classes:
    PlexusIoFileResource, PlexusIoSymlinkResource

    public interface HardLinkIdentitySupplier
    Optional identity for resources whose contents can share one hard-link payload. Implementations must return null when transformation or a replacement content supplier invalidates that relationship. Equal identities must denote the same content within a stable source, not merely equal bytes from unrelated files. Consumers must also compare the metadata they intend to write.
    Since:
    3.7.1
    • Method Detail

      • getHardLinkIdentity

        java.lang.Object getHardLinkIdentity()
                                      throws java.io.IOException
        Returns a source-scoped identity suitable for equality comparisons. Identities must only be cached for the duration of one archive operation.
        Returns:
        the content identity, or null when preservation cannot be guaranteed
        Throws:
        java.io.IOException - if source attributes cannot be read