fileutils

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 28

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSizeGb

func GetSizeGb(sizeStr string, defaultSize byte, base int) (int, error)

func GetSizeKb

func GetSizeKb(sizeStr string, defaultSize byte, base int) (int, error)

func GetSizeMb

func GetSizeMb(sizeStr string, defaultSize byte, base int) (int, error)

func IsDir added in v1.10.0

func IsDir(filepath string) bool

func IsFile added in v1.10.0

func IsFile(filepath string) bool

Types

type SReadSeeker added in v1.10.0

type SReadSeeker struct {
	// contains filtered or unexported fields
}

func NewReadSeeker added in v1.10.0

func NewReadSeeker(reader io.Reader, size int64) (*SReadSeeker, error)

func (*SReadSeeker) Close added in v1.10.0

func (s *SReadSeeker) Close() error

func (*SReadSeeker) Read added in v1.10.0

func (s *SReadSeeker) Read(p []byte) (int, error)

func (*SReadSeeker) Seek added in v1.10.0

func (s *SReadSeeker) Seek(offset int64, whence int) (int64, error)

type SparseFileWriter added in v1.10.0

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

func NewSparseFileWriter added in v1.10.0

func NewSparseFileWriter(f *os.File) *SparseFileWriter

func (*SparseFileWriter) Close added in v1.10.0

func (w *SparseFileWriter) Close() (err error)

func (*SparseFileWriter) PreClose added in v1.10.0

func (w *SparseFileWriter) PreClose() error

func (*SparseFileWriter) Write added in v1.10.0

func (w *SparseFileWriter) Write(d []byte) (int, error)

Jump to

Keyboard shortcuts

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