func DirExists(path string) (bool, error) {
	fileInfo, err := os.Stat(path)
	if err != nil {
		return false, fs.ErrNotExist
	}
	if !fileInfo.IsDir() {
		return false, fmt.Errorf("path is not a directory <%s>", path)
	}
	return true, nil
}
// DirExists returns true if the given path exists and is a directory
DirExists returns true if the given path exists and is a directory
// DirExists returns true if the given path exists and is a directory
func DirExists(path string) (bool, error) {
	fileInfo, err := os.Stat(path)
	if err != nil {
		return false, fs.ErrNotExist
	}
	if !fileInfo.IsDir() {
		return false, fmt.Errorf("path is not a directory <%s>", path)
	}
	return true, nil
}
func DirExists ( path string ) ( bool , error ) { fileInfo , err := os . Stat ( path ) if err != nil { return false , fs . ErrNotExist } if ! fileInfo . IsDir ( ) { return false , fmt . Errorf ( " " , path ) } return true , nil }
DirExists returns true if the given path exists and is a directory
DirExists returns true if the given path exists and is a directory