// well as some syscall errors.
//
// This function predates errors.Is. It only supports errors returned by
-// the os package. New code should use errors.Is(err, os.ErrExist).
+// the os package. New code should use errors.Is(err, fs.ErrExist).
func IsExist(err error) bool {
return underlyingErrorIs(err, ErrExist)
}
// ErrNotExist as well as some syscall errors.
//
// This function predates errors.Is. It only supports errors returned by
-// the os package. New code should use errors.Is(err, os.ErrNotExist).
+// the os package. New code should use errors.Is(err, fs.ErrNotExist).
func IsNotExist(err error) bool {
return underlyingErrorIs(err, ErrNotExist)
}
// as some syscall errors.
//
// This function predates errors.Is. It only supports errors returned by
-// the os package. New code should use errors.Is(err, os.ErrPermission).
+// the os package. New code should use errors.Is(err, fs.ErrPermission).
func IsPermission(err error) bool {
return underlyingErrorIs(err, ErrPermission)
}