Documentation ¶
Index ¶
- func CheckIsFileSizeSame(paths ...string) error
- 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, maxDepth int) (filePaths []string, err error)
- func GetDiskStat(path string) (diskStat types.DiskStat, err error)
- func GetEmptyFiles(directory string) (filePaths []string, err error)
- func IsDirectoryEmpty(directory string) (bool, error)
- func ListOpenFiles(procDirectory, directory string) ([]string, error)
- func ReadFileContent(filePath string) (string, error)
- func SyncFile(filePath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIsFileSizeSame ¶
CheckIsFileSizeSame verifies if all files in the provided paths have the same apparent and actual size. It returns an error if any file is a directory, does not exist, or has a different size.
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. If maxDepth is greater than 0, it limits the search to the specified depth. 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 IsDirectoryEmpty ¶
IsDirectoryEmpty returns true if the specified directory is empty.
func ListOpenFiles ¶
ListOpenFiles returns a list of open files in the specified directory.
func ReadFileContent ¶
ReadFileContent reads the content of the file.
Types ¶
This section is empty.