- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 202 for errExist (0.18 sec)
-
src/os/error_test.go
{&os.SyscallError{Err: fs.ErrExist}, true, false}, {nil, false, false}, } func TestIsExist(t *testing.T) { for _, tt := range isExistTests { if is := os.IsExist(tt.err); is != tt.is { t.Errorf("os.IsExist(%T %v) = %v, want %v", tt.err, tt.err, is, tt.is) } if is := errors.Is(tt.err, fs.ErrExist); is != tt.is { t.Errorf("errors.Is(%T %v, fs.ErrExist) = %v, want %v", tt.err, tt.err, is, tt.is) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 19 00:41:52 UTC 2023 - 4.9K bytes - Viewed (0) -
src/errors/errors.go
// matches the second. It reports whether it finds a match. It should be // used in preference to simple equality checks: // // if errors.Is(err, fs.ErrExist) // // is preferable to // // if err == fs.ErrExist // // because the former will succeed if err wraps [io/fs.ErrExist]. // // [As] examines the tree of its first argument looking for an error that can be
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 02 19:45:41 UTC 2023 - 2.9K bytes - Viewed (0) -
src/io/fs/fs.go
ErrExist = errExist() // "file already exists" ErrNotExist = errNotExist() // "file does not exist" ErrClosed = errClosed() // "file already closed" ) func errInvalid() error { return oserror.ErrInvalid } func errPermission() error { return oserror.ErrPermission } func errExist() error { return oserror.ErrExist }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 15 21:21:41 UTC 2024 - 9.4K bytes - Viewed (0) -
src/os/error.go
// that a file or directory already exists. It is satisfied by [ErrExist] 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, fs.ErrExist). func IsExist(err error) bool { return underlyingErrorIs(err, ErrExist) } // IsNotExist returns a boolean indicating whether the error is known to
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:33:12 UTC 2024 - 4.8K bytes - Viewed (0) -
src/internal/oserror/errors.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 02 17:57:18 UTC 2019 - 601 bytes - Viewed (0) -
src/os/tempfile.go
f, err := OpenFile(name, O_RDWR|O_CREATE|O_EXCL, 0600) if IsExist(err) { if try++; try < 10000 { continue } return nil, &PathError{Op: "createtemp", Path: prefix + "*" + suffix, Err: ErrExist} } return f, err } } var errPatternHasSeparator = errors.New("pattern contains path separator") // prefixAndSuffix splits pattern by the last wildcard "*", if applicable,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 12 18:04:39 UTC 2024 - 3.9K bytes - Viewed (0) -
src/errors/wrap.go
// // An error type might provide an Is method so it can be treated as equivalent // to an existing error. For example, if MyError defines // // func (m MyError) Is(target error) bool { return target == fs.ErrExist } // // then Is(MyError{}, fs.ErrExist) returns true. See [syscall.Errno.Is] for // an example in the standard library. An Is method should only shallowly // compare err and the target and not call [Unwrap] on either.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 17:13:04 UTC 2024 - 4.3K bytes - Viewed (0) -
cmd/xl-storage-errors.go
} func osIsPermission(err error) bool { return errors.Is(err, os.ErrPermission) || errors.Is(err, syscall.EROFS) } func osIsExist(err error) bool { return errors.Is(err, os.ErrExist)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Mar 06 16:56:29 UTC 2023 - 3.8K bytes - Viewed (0) -
cmd/kubeadm/app/phases/certs/certlist.go
kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util" "k8s.io/kubernetes/cmd/kubeadm/app/util/pkiutil" ) const ( errInvalid = "invalid argument" errExist = "file already exists" ) type configMutatorsFunc func(*kubeadmapi.InitConfiguration, *pkiutil.CertConfig) error // KubeadmCert represents a certificate that Kubeadm will create to function properly.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 01 16:01:49 UTC 2024 - 15.8K bytes - Viewed (0) -
cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go
if _, err := os.Stat(kubeConfigPath); err == nil { return errors.Errorf("%s: kube config: %s", errExist, kubeConfigPath) } else if !os.IsNotExist(err) { return errors.Wrapf(err, "unexpected error while checking if file exists: %s", kubeConfigPath) } if pkiutil.CSROrKeyExist(kubeConfigDir, name) { return errors.Errorf("%s: csr: %s", errExist, kubeConfigPath) } clientCertConfig := newClientCertConfigFromKubeConfigSpec(spec)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 07 17:04:18 UTC 2024 - 27K bytes - Viewed (0)