iox

package
v0.0.0-...-fc135a5 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const NestSeparator = "|"

Variables

This section is empty.

Functions

This section is empty.

Types

type FileInput

type FileInput struct {
	*os.File
	// contains filtered or unexported fields
}

func NewFileInput

func NewFileInput(path string, info os.FileInfo) *FileInput

func (*FileInput) Info

func (fi *FileInput) Info() (os.FileInfo, error)

func (*FileInput) Open

func (fi *FileInput) Open() error

func (*FileInput) Path

func (fi *FileInput) Path() string

type FileOutput

type FileOutput struct {
	*os.File
	// contains filtered or unexported fields
}

func NewFileOutput

func NewFileOutput(path string) *FileOutput

func (*FileOutput) Close

func (fo *FileOutput) Close() error

func (*FileOutput) Open

func (fo *FileOutput) Open(info os.FileInfo) error

func (*FileOutput) Path

func (fo *FileOutput) Path() string

type Input

type Input interface {
	io.Reader
	Path() string
	Info() (os.FileInfo, error)
	Open() error
	Close() error
}

type Output

type Output interface {
	io.Writer
	Path() string
	Open(info os.FileInfo) error
	Close() error
}

type SafeZipWriter

type SafeZipWriter struct {
	*zip.Writer
	*sync.Mutex
	// contains filtered or unexported fields
}

func NewZipWriter

func NewZipWriter(f io.WriteCloser, ref int32) *SafeZipWriter

func (*SafeZipWriter) UnRef

func (zw *SafeZipWriter) UnRef() error

type ZipInput

type ZipInput struct {
	io.ReadCloser
	// contains filtered or unexported fields
}

func NewZipInput

func NewZipInput(path string) (*ZipInput, error)

func (*ZipInput) Close

func (zi *ZipInput) Close() error

func (*ZipInput) Info

func (zi *ZipInput) Info() (os.FileInfo, error)

func (*ZipInput) Open

func (zi *ZipInput) Open() error

func (*ZipInput) Path

func (zi *ZipInput) Path() string

type ZipOutput

type ZipOutput struct {
	io.Writer
	// contains filtered or unexported fields
}

func NewZipOutput

func NewZipOutput(path string) (*ZipOutput, error)

func (*ZipOutput) Close

func (zo *ZipOutput) Close() error

func (*ZipOutput) Open

func (zo *ZipOutput) Open(info os.FileInfo) error

func (*ZipOutput) Path

func (zo *ZipOutput) Path() string

func (*ZipOutput) SetZipWriter

func (zo *ZipOutput) SetZipWriter(zw *SafeZipWriter)

Jump to

Keyboard shortcuts

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