Documentation ¶
Index ¶
- Constants
- func Create(ctx context.Context, src string, dst io.Writer, opts CreateOpts) error
- func Extract(ctx context.Context, dst string, reader io.Reader, opts *ExtractOpts) error
- func FileInfoHeader(fi os.FileInfo, link string, fullpath string) (*tar.Header, error)
- func Tar(writer io.Writer, files map[string]TarFileReader) error
- type CreateOpts
- type ExtractOpts
- type TarFileReader
Constants ¶
View Source
const ( // Types TypeReg = '0' // regular file TypeRegA = '\x00' // regular file TypeLink = '1' // hard link TypeSymlink = '2' // symbolic link TypeChar = '3' // character device node TypeBlock = '4' // block device node TypeDir = '5' // directory TypeFifo = '6' // fifo node TypeCont = '7' // reserved TypeXHeader = 'x' // extended header TypeXGlobalHeader = 'g' // global extended header TypeGNULongName = 'L' // Next file has a long name TypeGNULongLink = 'K' // Next file symlinks to a file w/ a long name TypeGNUSparse = 'S' // sparse file )
Variables ¶
This section is empty.
Functions ¶
func FileInfoHeader ¶
Types ¶
type CreateOpts ¶
type CreateOpts struct { Fs fspkg.Fs IncludeRoot bool // CopyBufferSize is the size of the memory buffer used to perform the copy // from the file to the tarball writer CopyBufferSize int64 }
CreateOpts gathers all possible options to create a tarball archive
type ExtractOpts ¶
type TarFileReader ¶
Click to show internal directories.
Click to hide internal directories.