Documentation ¶
Index ¶
- func CopyDirectory(sourcePath, destinationPath string, doOverWrite bool) error
- func CopyFile(sourcePath, destinationPath string, overWrite bool) error
- func CopyFiles(sourcePath, destinationPath string, doOverWrite bool) error
- func CreateDirectory(path string, modTime time.Time) (string, error)
- func FindFiles(directory, fileName string) (filePaths []string, err error)
- func GetDiskStat(path string) (diskStat types.DiskStat, err error)
- func GetEmptyFiles(directory string) (filePaths []string, err error)
- func ReadFileContent(filePath string) (string, error)
- func SyncFile(filePath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDirectory ¶
CopyDirectory copies the directory from source to destination.
func CreateDirectory ¶
CreateDirectory creates a directory at the specified path, and sets the modification time.
func FindFiles ¶
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 ¶
GetDiskStat returns the disk stat for the specified path.
func GetEmptyFiles ¶
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 ¶
ReadFileContent reads the content of the file.
Types ¶
This section is empty.