Documentation ¶
Index ¶
Constants ¶
View Source
const RECEIVE_TEMP_FILE_NAME_PREFIX = "portal-receive-temp"
View Source
const SEND_TEMP_FILE_NAME_PREFIX = "portal-send-temp"
Variables ¶
View Source
var ErrUninitialized = errors.New("unpacker is uninitialized")
View Source
var ErrUnpackFileExists = errors.New("file exists")
View Source
var ErrUnpackNoHeader = errors.New("no header in tar archive")
Functions ¶
func PackFiles ¶ added in v1.2.0
PackFiles tars and gzip-compresses files into a temporary file, returning it along with the resulting size
func RemoveTemporaryFiles ¶
func RemoveTemporaryFiles(prefix string)
optimistically remove files created by portal with the specified prefix
Types ¶
type Unpacker ¶ added in v1.2.2
type Unpacker struct {
// contains filtered or unexported fields
}
Unpacker defines an encapsulated unit for unpacking a compressed tar archive
func NewUnpacker ¶ added in v1.2.2
func NewUnpacker(prompt bool, r io.ReadCloser) (*Unpacker, error)
func (*Unpacker) Unpack ¶ added in v1.2.2
Unpack will decompress and unpack the archive. Resolves a Committer which can be used to write file to disk. If the unpacker is configured to prompt it will return a ErrUnpackFileExists along with the committer. Returns a io.EOF once the archive has been fully consumed.
Click to show internal directories.
Click to hide internal directories.