func (d *Dir) cleanDirs(entries []os.DirEntry) (err error) {
	for name := range d.Dirs {
		found := false
		for _, entry := range entries {
			if !entry.IsDir() {
				continue
			}
			if entry.Name() == name {
				found = true
				break
			}
		}
		if !found {
			delete(d.Dirs, name)
		}
	}
	return
}
// cleanDirs removes directories that no longer exist
cleanDirs removes directories that no longer exist
// cleanDirs removes directories that no longer exist
func (d *Dir) cleanDirs(entries []os.DirEntry) (err error) {
	for name := range d.Dirs {
		found := false
		for _, entry := range entries {
			if !entry.IsDir() {
				continue
			}
			if entry.Name() == name {
				found = true
				break
			}
		}
		if !found {
			delete(d.Dirs, name)
		}
	}
	return
}
func ( d * Dir ) cleanDirs ( entries [ ] os . DirEntry ) ( err error ) { for name := range d . Dirs { found := false for _ , entry := range entries { if ! entry . IsDir ( ) { continue } if entry . Name ( ) == name { found = true break } } if ! found { delete ( d . Dirs , name ) } } return }
cleanDirs removes directories that no longer exist
cleanDirs removes directories that no longer exist