public interface

ArchiveSource

com.atlassian.bitbucket.migration.ArchiveSource

Class Overview

Provides access to an archive within an archive.

Summary

Public Methods
void extractToDisk(Path target, Predicate<String> filter)
Filter and extract this contents of this archive to the specified target.
void extractToDisk(Path target)
Extract this contents of this archive to the specified target.
@Nonnull Path getPath()
Get the path of this archive source.
void read(IoConsumer<EntrySource> reader, Predicate<String> filter)
Filter and read each file in the archive.
void read(IoConsumer<EntrySource> reader)
Filter and read each file in the archive.

Public Methods

public void extractToDisk (Path target, Predicate<String> filter)

Filter and extract this contents of this archive to the specified target.

Parameters
target path on disk where files will be extracted
filter predicate applied to each file before extraction. If the predicate returns false the file will not be extracted
Throws
IOException

public void extractToDisk (Path target)

Extract this contents of this archive to the specified target.

Parameters
target path on disk where files will be extracted
Throws
IOException

@Nonnull public Path getPath ()

Get the path of this archive source.

Returns
  • the path of this archive source

public void read (IoConsumer<EntrySource> reader, Predicate<String> filter)

Filter and read each file in the archive.

Parameters
reader used to read the contents of each file
filter predicate applied to each file before reading. If the predicate returns false the file will not be extracted
Throws
IOException

public void read (IoConsumer<EntrySource> reader)

Filter and read each file in the archive.

Parameters
reader used to read the contents of each file
Throws
IOException