github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/kbfs/ioutil/is_exist_default.go (about)

     1  // Copyright 2016 Keybase Inc. All rights reserved.
     2  // Use of this source code is governed by a BSD
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build !windows
     6  // +build !windows
     7  
     8  package ioutil
     9  
    10  import (
    11  	"os"
    12  
    13  	"github.com/pkg/errors"
    14  )
    15  
    16  // IsExist wraps os.IsExist to work around
    17  // https://github.com/golang/go/issues/17164 .
    18  func IsExist(err error) bool {
    19  	return os.IsExist(errors.Cause(err))
    20  }