Documentation ¶
Index ¶
- Constants
- func CopyPaths(targetDir string, c <-chan *FileCopy, verbose bool) error
- func IsFileExist(filePath string) bool
- func IsPathExist(path string) bool
- func ListDirFiles(dirPath string, suffix string) (files []string, err error)
- func ListSubDirs(dirPath string) (folder []string, err error)
- func ReadFileAsString(filePath string) (string, error)
- func WalkDirFileAll(dirPath, suffix string) (files []string, err error)
- func WalkDirFolderAll(dirPath string) (folder []string, err error)
- func WalkPaths(srcDir, suffix string, c chan<- *FileCopy)
- type FileCopy
- type FileMerge
Constants ¶
const ( IsDirectory = iota IsRegular IsSymlink )
Variables ¶
This section is empty.
Functions ¶
func CopyPaths ¶
write chan file to targetDir after WalkPaths(srcDir, suffix string, c chan<- *FileCopy) targetDir -> targetDir c -> WalkPaths return chan verbose -> is show log
func IsPathExist ¶
is path exist, most of this use check folder path -> path for check
func ListDirFiles ¶
List DirPath all file, ignore sub folder dirPth -> for walk path suffix -> suffix want, if "" not check, ignore the case of suffix matching
func ListSubDirs ¶
List DirPath all sub-folder, ignore sub Dirs dirPth -> for walk path
func ReadFileAsString ¶
read file content as string filePath -> path of file
func WalkDirFileAll ¶
can get full file and in sub-folder file, ignore folder name dirPth -> for walk path suffix -> suffix want, if "" not check, ignore the case of suffix matching
func WalkDirFolderAll ¶
can get full folder and in sub-folder folder, ignore all file, and including itself dirPth -> for walk path