ShrinkWrap
  1. ShrinkWrap
  2. SHRINKWRAP-232

Return asset removed by delete method instead of a boolean

    Details

    • Type: Feature Request Feature Request
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 1.0.0-alpha-11
    • Fix Version/s: 1.0.0-alpha-12
    • Component/s: api
    • Labels:
      None
    • Affects:
      Documentation (Ref Guide, User Guide, etc.), Compatibility/Configuration
    • Estimated Difficulty:
      Low
    • Similar Issues:
      Show 10 results 

      Description

      The Archive#delete(ArchivePath) operation should return the Asset (or Node) being removed (at the specified ArchivePath) rather than returning boolean. This both avoids having to have an extra call to get the asset before removing it, and it's consistent with the familiar behavior of the JDK Map API.

      // Removes the Asset in the archive at the specified Path and returns the removed Asset
      Node delete(ArchivePath path);

      The only thing I'm not sure about is whether the Asset return type is sufficient for when you delete a directory path.

        Activity

        Hide
        Aslak Knutsen
        added a comment -

        We need to return a disconnected Node. ArchivePath is a pointer to a Node, not an Asset. A Node can contain multiple Assets.

        Show
        Aslak Knutsen
        added a comment - We need to return a disconnected Node. ArchivePath is a pointer to a Node, not an Asset. A Node can contain multiple Assets.

          People

          • Assignee:
            Andrew Rubinger
            Reporter:
            Dan Allen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: