io

package
v0.0.0-...-3514596 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDirectory

func CopyDirectory(sourcePath, destinationPath string, doOverWrite bool) error

CopyDirectory copies the directory from source to destination.

func CopyFile

func CopyFile(sourcePath, destinationPath string, overWrite bool) error

CopyFile copies the file from source to destination.

func CopyFiles

func CopyFiles(sourcePath, destinationPath string, doOverWrite bool) error

CopyFiles copies the files from source to destination.

func CreateDirectory

func CreateDirectory(path string, modTime time.Time) (string, error)

CreateDirectory creates a directory at the specified path, and sets the modification time.

func FindFiles

func FindFiles(directory, fileName string) (filePaths []string, err error)

FindFiles searches for files in the specified directory with the given fileName. If fileName is empty, it retrieves all files in the directory. It returns a slice of filePaths and an error if any.

func GetDiskStat

func GetDiskStat(path string) (diskStat types.DiskStat, err error)

GetDiskStat returns the disk stat for the specified path.

func GetEmptyFiles

func GetEmptyFiles(directory string) (filePaths []string, err error)

GetEmptyFiles retrieves a list of paths for all empty files within the specified directory. It uses filepath.Walk to traverse the directory and finds files with zero size. It returns a slice of filePaths and an error if any.

func ReadFileContent

func ReadFileContent(filePath string) (string, error)

ReadFileContent reads the content of the file.

func SyncFile

func SyncFile(filePath string) error

SyncFile syncs the file to the disk.

Types

This section is empty.

Jump to

Keyboard shortcuts

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