func ValidateFileAttrValue(path string) (string, error) {
	absPath, err := utils.ExpandPath(path)
	if err != nil {
		return "", err
	}
	info, err := os.Stat(absPath)
	if err != nil {
		return "", errors.Errorf("invalid file path: %s", absPath)
	}
	if info.IsDir() {
		return "", errors.Errorf("file path must be a file: %s", absPath)
	}
	return absPath, nil
}
// ValidateFileAttrValue returns the normalised file path, so
// long as the specified path is valid and not a directory.
ValidateFileAttrValue returns the normalised file path, so
long as the specified path is valid and not a directory.
// ValidateFileAttrValue returns the normalised file path so // long as the specified path is valid and not a directory .
func ValidateFileAttrValue(path string) (string, error) {
	absPath, err := utils.ExpandPath(path)
	if err != nil {
		return "", err
	}
	info, err := os.Stat(absPath)
	if err != nil {
		return "", errors.Errorf("invalid file path: %s", absPath)
	}
	if info.IsDir() {
		return "", errors.Errorf("file path must be a file: %s", absPath)
	}
	return absPath, nil
}
func ValidateFileAttrValue ( path string ) ( string , error ) { absPath , err := utils . ExpandPath ( path ) if err != nil { return " " , err } info , err := os . Stat ( absPath ) if err != nil { return " " , errors . Errorf ( " " , absPath ) } if info . IsDir ( ) { return " " , errors . Errorf ( " " , absPath ) } return absPath , nil }
ValidateFileAttrValue returns the normalised file path, so
long as the specified path is valid and not a directory.
ValidateFileAttrValue returns the normalised file path so long as the specified path is valid and not a directory .