Example #1
0
File: main.go Project: rjeczalik/fs
func countdirdelfile(ndir *int, fs memfs.FS) filepath.WalkFunc {
	return func(s string, fi os.FileInfo, _ error) (err error) {
		if fi.IsDir() {
			*ndir++
		} else {
			err = fs.Remove(s)
		}
		return
	}
}