Documentation ¶
Index ¶
- Constants
- func CopyFile(filename string, mode os.FileMode, fileReader io.Reader) error
- func Mkdir(dstpath string) error
- func Symlink(linkname string, filename string, consumer *state.Consumer) error
- type CompressResult
- type EntryDoneFunc
- type ExtractResult
- func Extract(readerAt io.ReaderAt, size int64, destPath string, settings ExtractSettings) (*ExtractResult, error)
- func ExtractPath(archive string, destPath string, settings ExtractSettings) (*ExtractResult, error)
- func ExtractTar(archive string, dir string, settings ExtractSettings) (*ExtractResult, error)
- func ExtractZip(readerAt io.ReaderAt, size int64, dir string, settings ExtractSettings) (*ExtractResult, error)
- type ExtractSettings
- type UncompressedSizeKnownFunc
Constants ¶
View Source
const ( // ModeMask is or'd with files walked by butler ModeMask = 0666 // LuckyMode is used when wiping in last-chance mode LuckyMode = 0777 // DirMode is the default mode for directories created by butler DirMode = 0755 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EntryDoneFunc ¶
type EntryDoneFunc func(slashPath string)
type ExtractResult ¶
func Extract ¶
func Extract(readerAt io.ReaderAt, size int64, destPath string, settings ExtractSettings) (*ExtractResult, error)
func ExtractPath ¶
func ExtractPath(archive string, destPath string, settings ExtractSettings) (*ExtractResult, error)
func ExtractTar ¶
func ExtractTar(archive string, dir string, settings ExtractSettings) (*ExtractResult, error)
Does not preserve users, nor permission, except the executable bit
func ExtractZip ¶
func ExtractZip(readerAt io.ReaderAt, size int64, dir string, settings ExtractSettings) (*ExtractResult, error)
type ExtractSettings ¶
type ExtractSettings struct { Consumer *state.Consumer ResumeFrom string OnUncompressedSizeKnown UncompressedSizeKnownFunc OnEntryDone EntryDoneFunc DryRun bool Concurrency int }
type UncompressedSizeKnownFunc ¶
type UncompressedSizeKnownFunc func(uncompressedSize int64)
Click to show internal directories.
Click to hide internal directories.