copy icon indicating copy to clipboard operation
copy copied to clipboard

Add fileinfo to skip function

Open tongjingran opened this issue 4 years ago • 2 comments

FileInfo is needed to determine whether the file needs to be skipped in many cases.

tongjingran avatar Dec 23 '20 12:12 tongjingran

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.

tongjingran avatar Dec 29 '20 06:12 tongjingran

You are right. It's gonna be v2 then with more refactoring because it's change of interface of this package

otiai10 avatar Dec 29 '20 14:12 otiai10