Skip to content

Commit

Permalink
add documentation for WrappedArchive methods
Browse files Browse the repository at this point in the history
  • Loading branch information
memo33 committed Mar 31, 2024
1 parent f7d3aa6 commit e84e14f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/scala/sc4pac/extractor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,20 @@ object Extractor {
}

private sealed trait WrappedArchive[A] extends AutoCloseable {
/** Enumerate all entries contained in the archive. */
def getEntries: Iterator[A]
/** The stringified subpath of the entry within the archive. */
def getEntryPath(entry: A): String
def isDirectory(entry: A): Boolean
def isUnixSymlink(entry: A): Boolean
/** Perform the actual extraction of the selected archive entries.
*
* Here, `entries` consists of a sequence of:
* - an entry selected for extraction,
* - the corresponding full target path for this entry.
* The target paths are already mapped to discard redundant top-level
* directories, so can differ from the what `getEntryPath` returned.
*/
def extractSelected(entries: Seq[(A, os.Path)], overwrite: Boolean): Unit
}

Expand Down

0 comments on commit e84e14f

Please sign in to comment.