io

package
v0.0.0-...-9ac2298 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendFile

func AppendFile(path string, data []string) error

func CleanFile

func CleanFile(path string) error

func CopyFile

func CopyFile(oldPath, newPath string) error

func CreateDir

func CreateDir(dir string) error

func CreateFile

func CreateFile(path string) error

func CreatePath

func CreatePath(relativePath string) error

func CurrentDir

func CurrentDir() (string, error)

func HierarchyDir

func HierarchyDir(dir string) ([]string, error)

func IsExistDir

func IsExistDir(dir string) (bool, error)

func IsExistFile

func IsExistFile(path string) (bool, error)

func LsDir

func LsDir(dir string) ([]string, error)

func ReadFileByLine

func ReadFileByLine(path string) ([]string, error)

func ReadFileObj

func ReadFileObj[T any](path string) ([]T, error)

func ReadPath

func ReadPath(relativePath string) ([]byte, error)

func RemoveDir

func RemoveDir(dir string) error

func RemoveFile

func RemoveFile(path string) error

func RenameFile

func RenameFile(oldPath, newPath string) error

func TruncateFile

func TruncateFile(path string, size int64) error

func Unzip

func Unzip(zipFile, destFolder string) error

func WriteFile

func WriteFile(path string, data []string) error

func WriteFileObj

func WriteFileObj[T any](path string, data T) error

func WritePath

func WritePath(relativePath string, content []byte) error

func Zip

func Zip(zipFileName string, files []string) error

Types

type FileInfoStruct

type FileInfoStruct struct {
	Name    string
	Size    int64
	Mode    os.FileMode
	ModTime string
	IsDir   bool
	Sys     interface{}
	All     os.FileInfo
}

func FileInfo

func FileInfo(path string) (*FileInfoStruct, error)

Jump to

Keyboard shortcuts

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