func IsFileExists(path string, followSymlink bool) (bool, error) {
	fileInfo, err := GetFileInfo(path, followSymlink)
	if err != nil {
		if os.IsNotExist(err) { // If doesn't exist, don't omit an error
			return false, nil
		}
		return false, err
	}
	return !fileInfo.IsDir(), nil
}
// Check if path points at a file.
// If path points at a symlink and `followSymlink == false`,
// function will return `true` regardless of the symlink target
Check if path points at a file.
If path points at a symlink and `followSymlink == false`,
function will return `true` regardless of the symlink target
// Check if path points at a file . // If path points at a symlink and ` followSymlink == false ` // function will return ` true ` regardless of the symlink target
func IsFileExists(path string, followSymlink bool) (bool, error) {
	fileInfo, err := GetFileInfo(path, followSymlink)
	if err != nil {
		if os.IsNotExist(err) { 
			return false, nil
		}
		return false, err
	}
	return !fileInfo.IsDir(), nil
}
func IsFileExists ( path string , followSymlink bool ) ( bool , error ) { fileInfo , err := GetFileInfo ( path , followSymlink ) if err != nil { if os . IsNotExist ( err ) { return false , nil } return false , err } return ! fileInfo . IsDir ( ) , nil }
Check if path points at a file.
Check if path points at a file .
// If doesn't exist, don't omit an error