Documentation ¶
Index ¶
- Variables
- func CollectToDir(dst, root string, filter func(dir string, file os.FileInfo) bool, ...) error
- func CopyFile(dst, src string, osdn OsDepNames) error
- func CopyRecursive(dst, src string, filter func(dir string, info os.FileInfo) bool, ...) error
- func CopyToDir(dst string, osdn OsDepNames, files ...string) error
- func CopyTree(dst, src string, filter func(dir string, info os.FileInfo) bool, ...) error
- func SetLog(l *slog.Logger)
- func Task(name string, do func() error) (err error)
- func ZipDist(zipname string, dist, distDir string) error
- type OsDepNames
Constants ¶
This section is empty.
Variables ¶
View Source
var OsDepExe = OsDepNames{
"windows": "%s.exe",
}
Functions ¶
func CollectToDir ¶
func CollectToDir( dst, root string, filter func(dir string, file os.FileInfo) bool, osdn OsDepNames, ) error
Search file tree root for files that match filter and copy them to the single destination directory dst. If filter is nil all files are collected.
func CopyFile ¶
func CopyFile(dst, src string, osdn OsDepNames) error
CopyFile copies file with path src to file with path dst. It also tarnsfers the file mode from the src file to the dst file.
func CopyRecursive ¶
func CopyRecursive( dst, src string, filter func(dir string, info os.FileInfo) bool, osdn OsDepNames, ) error
CopyRecursive copies the content of the src directory into the dst directory. If filter is not nil only those files or subdirectories are copied for which the filter returns true.
func CopyToDir ¶
func CopyToDir(dst string, osdn OsDepNames, files ...string) error
CopyToDir copies a list of files to a single destination directory using CopyFile on each source file.
Types ¶
type OsDepNames ¶
Click to show internal directories.
Click to hide internal directories.