// AllDirPaths traverse the vnode links and returns a slice of all the child dirpath.
AllDirPaths traverse the vnode links and returns a slice of all the child dirpath.
// AllDirPaths traverse the vnode links and returns a slice of all the child dirpath .
func (vn *VNode) AllDirPaths() []string {
	if !vn.IsDir() {
		return []string{}
	}
	var wg sync.WaitGroup
	dirPaths := []string{vn.Path}
	for _, vnode := range vn.Links {
		wg.Add(1)
		go func(vnode *VNode) {
			paths := vnode.AllDirPaths()
			dirPaths = append(dirPaths, paths...)
			wg.Done()
		}(vnode)
	}
	wg.Wait()
	return dirPaths
}
func ( vn * VNode ) AllDirPaths ( ) [ ] string { if ! vn . IsDir ( ) { return [ ] string { } } var wg sync . WaitGroup dirPaths := [ ] string { vn . Path } for _ , vnode := range vn . Links { wg . Add ( 1 ) go func ( vnode * VNode ) { paths := vnode . AllDirPaths ( ) dirPaths = append ( dirPaths , paths ... ) wg . Done ( ) } ( vnode ) } wg . Wait ( ) return dirPaths }
AllDirPaths traverse the vnode links and returns a slice of all the child dirpath.
AllDirPaths traverse the vnode links and returns a slice of all the child dirpath .