ioutil

package
v0.2.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDESDecryptorBufSize = 32 * 1024

Functions

func CopyBuffer

func CopyBuffer(ctx context.Context, dst io.Writer, src io.Reader, buf []byte) (written int64, err error)

copyBuffer is the cancelable implementation of Copy and CopyBuffer. if buf is nil, one is allocated.

func CopyDir

func CopyDir(ctx context.Context, source string, dest string) (err error)

func CopyFile

func CopyFile(ctx context.Context, src, dst string) error

func DESDecryptor

func DESDecryptor(ctx context.Context, key, iv []byte, cipherReader io.Reader, size int64) (io.Reader, error)

func DecryptAES

func DecryptAES(data []byte, password string) ([]byte, error)

func DecryptAESFile

func DecryptAESFile(src, dst string, password string) error

func EncryptAES

func EncryptAES(data []byte, password string) ([]byte, error)

func EncryptAESFile

func EncryptAESFile(src, dst string, password string) error

func LimitReadAll

func LimitReadAll(ctx context.Context, r io.Reader, p []byte) (int, error)

func LimitWriteAll

func LimitWriteAll(ctx context.Context, w io.Writer, p []byte) (int, error)

func Targz

func Targz(ctx context.Context, src, dst string) error

Types

type ProgressWriter

type ProgressWriter interface {
	io.Writer
	Written() int64
	Percentage() float64
}

func NewProgressWriter

func NewProgressWriter(ctx context.Context, w io.Writer, size int64) ProgressWriter

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL