// Check if path points at a directory.
// If path points at a symlink and `followSymlink == false`,
// function will return `false` regardless of the symlink target
Check if path points at a directory.
If path points at a symlink and `followSymlink == false`,
function will return `false` regardless of the symlink target
// Check if path points at a directory . // If path points at a symlink and ` followSymlink == false ` // function will return ` false ` regardless of the symlink target
func IsDirExists(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 IsDirExists ( 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 directory.
Check if path points at a directory .
// If doesn't exist, don't omit an error