fileutils

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 8 Imported by: 7

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

func IsDir(filepath string) bool

func IsFile

func IsFile(filepath string) bool

Types

type SReadSeeker

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

func NewReadSeeker

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

func (*SReadSeeker) Close

func (s *SReadSeeker) Close() error

func (*SReadSeeker) Read

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

func (*SReadSeeker) Seek

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

type SparseFileWriter

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

func NewSparseFileWriter

func NewSparseFileWriter(f *os.File) *SparseFileWriter

func (*SparseFileWriter) Close

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

func (*SparseFileWriter) PreClose

func (w *SparseFileWriter) PreClose() error

func (*SparseFileWriter) Write

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