fileutil

package
v0.0.0-...-d945efd Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(source, dest string) error

func ExtractCompressedFile

func ExtractCompressedFile(source, target string) (string, error)

func SplitFile

func SplitFile(filePath, destPath, partSize string) error

Types

type OSFS

type OSFS struct{}

func (OSFS) MkdirAll

func (OSFS) MkdirAll(path string, perm os.FileMode) error

func (OSFS) MkdirTemp

func (OSFS) MkdirTemp(dir, prefix string) (string, error)

func (OSFS) ReadFile

func (OSFS) ReadFile(name string) ([]byte, error)

func (OSFS) Remove

func (OSFS) Remove(name string) error

func (OSFS) RemoveAll

func (OSFS) RemoveAll(path string) error

func (OSFS) Stat

func (OSFS) Stat(name string) (os.FileInfo, error)

func (OSFS) UserHomeDir

func (OSFS) UserHomeDir() (string, error)

func (OSFS) WriteFile

func (OSFS) WriteFile(name string, data []byte, perm os.FileMode) error

type OSInterface

type OSInterface interface {
	MkdirTemp(dir, prefix string) (string, error)
	Stat(name string) (os.FileInfo, error)
	Remove(name string) error
	UserHomeDir() (string, error)
	MkdirAll(path string, perm os.FileMode) error
	WriteFile(name string, data []byte, perm os.FileMode) error
	ReadFile(name string) ([]byte, error)
	RemoveAll(path string) error
}

Jump to

Keyboard shortcuts

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