copy
copy copied to clipboard
Add fileinfo to skip function
trafficstars
FileInfo is needed to determine whether the file needs to be skipped in many cases.
The Skip function looks like a callback function to judge the file should skip or not.
In golang project, package path/filepath has a similar type WalkFunc.
type WalkFunc func(path string, info os.FileInfo, err error) error
In most situaitions, simply providing the file name is not enough. Use an extra os.Stat operation is a waste of performance.
You are right. It's gonna be v2 then with more refactoring because it's change of interface of this package