public class ArtifactStreams extends Object
Modifier and Type | Field and Description |
---|---|
static Duration |
TOO_LONG_PROCESSING_DURATION |
Constructor and Description |
---|
ArtifactStreams() |
Modifier and Type | Method and Description |
---|---|
static ArtifactUnpackResult |
deserialiseStreamToDir(InputStream in,
Path destination,
com.atlassian.event.api.EventPublisher eventPublisher)
Deserialises an input stream into the supplied destination path
|
static Stream<String> |
iterateFilesAndDirs(Path rootDir)
Similar to
FileUtils.iterateFilesAndDirs(File, IOFileFilter, IOFileFilter) but works on Path s and
returns file names relative to root dir. |
static ArtifactHandlerPublishingResult |
writeFileSetToStream(org.apache.tools.ant.types.FileSet fileSet,
OutputStream out)
Serialises a fileset into an output stream.
|
static ArtifactHandlerPublishingResult |
writeFilesToStream(Path rootDir,
Stream<String> filesStream,
OutputStream out)
Serialises a files into an output stream.
|
public static final Duration TOO_LONG_PROCESSING_DURATION
@NotNull public static ArtifactUnpackResult deserialiseStreamToDir(InputStream in, Path destination, com.atlassian.event.api.EventPublisher eventPublisher) throws IOException
IOException
public static ArtifactHandlerPublishingResult writeFileSetToStream(org.apache.tools.ant.types.FileSet fileSet, OutputStream out) throws IOException
IOException
public static ArtifactHandlerPublishingResult writeFilesToStream(Path rootDir, Stream<String> filesStream, OutputStream out) throws IOException
IOException
@NotNull public static Stream<String> iterateFilesAndDirs(Path rootDir) throws IOException
FileUtils.iterateFilesAndDirs(File, IOFileFilter, IOFileFilter)
but works on Path
s and
returns file names relative to root dir. Also, does not include the root directory in the result.IOException
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.