- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 20 for ErrInvalid (0.55 sec)
-
src/internal/oserror/errors.go
// Package oserror defines errors values used in the os package. // // These types are defined here to permit the syscall package to reference them. package oserror import "errors" var ( ErrInvalid = errors.New("invalid argument") ErrPermission = errors.New("permission denied") ErrExist = errors.New("file already exists") ErrNotExist = errors.New("file does not exist")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 02 17:57:18 UTC 2019 - 601 bytes - Viewed (0) -
src/io/fs/sub.go
// chroot-style security mechanism, and Sub does not change that fact. func Sub(fsys FS, dir string) (FS, error) { if !ValidPath(dir) { return nil, &PathError{Op: "sub", Path: dir, Err: ErrInvalid} } if dir == "." { return fsys, nil } if fsys, ok := fsys.(SubFS); ok { return fsys.Sub(dir) } return &subFS{fsys, dir}, nil } type subFS struct { fsys FS dir string }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Feb 10 02:10:17 UTC 2024 - 3.6K bytes - Viewed (0) -
internal/lock/lock_test.go
if !isClosed { t.Fatal("File ref count should be zero") } // Closing a file again should result in invalid argument. if err = rlk.Close(); err != os.ErrInvalid { t.Fatal(err) } _, err = newRLockedFile(nil) if err != os.ErrInvalid { t.Fatal("Unexpected error", err) } } // Tests lock and unlock semantics. func TestLockAndUnlock(t *testing.T) { f, err := os.CreateTemp("", "lock")
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 3.6K bytes - Viewed (0) -
src/os/file_mutex_plan9.go
// is already closed. This method is on File so that we can incorporate // a nil test. func (f *File) incref(op string) (err error) { if f == nil { return ErrInvalid } if !f.fdmu.Incref() { err = ErrClosed if op != "" { err = &PathError{Op: op, Path: f.name, Err: err} } } return err } // decref removes a reference to the file. If this is the last
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Oct 08 03:57:40 UTC 2022 - 1.8K bytes - Viewed (0) -
src/testing/fstest/testfs_test.go
type failPermFS struct{} func (f failPermFS) Open(name string) (fs.File, error) { if !fs.ValidPath(name) { return nil, &fs.PathError{Op: "open", Path: name, Err: fs.ErrInvalid} } return nil, &fs.PathError{Op: "open", Path: name, Err: fs.ErrPermission} } func TestTestFSWrappedErrors(t *testing.T) { err := TestFS(failPermFS{}) if err == nil { t.Fatal("error expected") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 2.9K bytes - Viewed (0) -
src/os/exec_plan9.go
func (p *Process) kill() error { return p.signal(Kill) } func (p *Process) wait() (ps *ProcessState, err error) { var waitmsg syscall.Waitmsg switch p.pidStatus() { case statusReleased: return nil, ErrInvalid } err = syscall.WaitProcess(p.Pid, &waitmsg) if err != nil { return nil, NewSyscallError("wait", err) } p.pidDeactivate(statusDone) ps = &ProcessState{ pid: waitmsg.Pid,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 22:06:47 UTC 2024 - 3.4K bytes - Viewed (0) -
src/os/file_posix.go
// be canceled and return immediately with an [ErrClosed] error. // Close will return an error if it has already been called. func (f *File) Close() error { if f == nil { return ErrInvalid } return f.file.close() } // read reads up to len(b) bytes from the File. // It returns the number of bytes read and an error, if any. func (f *File) read(b []byte) (n int, err error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:33:12 UTC 2024 - 7.1K bytes - Viewed (0) -
cni/pkg/nodeagent/fakes_test.go
// and the Err field describing the problem. // // Open should reject attempts to open names that do not satisfy // ValidPath(name), returning a *PathError with Err set to // ErrInvalid or ErrNotExist. func (ffs *fakeFsWithFakeFds) Open(name string) (fs.File, error) { f, err := ffs.ReadDirFS.Open(name) if err != nil { return nil, err } return wrapFile(f), nil }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Apr 12 21:47:31 UTC 2024 - 3.9K bytes - Viewed (0) -
misc/cgo/gmp/gmp.go
func (z *Int) SetString(s string, base int) error { z.doinit() if base < 2 || base > 36 { return os.ErrInvalid } p := C.CString(s) defer C.free(unsafe.Pointer(p)) if C.mpz_set_str(&z.i[0], p, C.int(base)) < 0 { return os.ErrInvalid } return nil } // String returns the decimal representation of z. func (z *Int) String() string { if z == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 9.5K bytes - Viewed (0) -
src/os/stat_windows.go
"unsafe" ) // Stat returns the [FileInfo] structure describing file. // If there is an error, it will be of type [*PathError]. func (file *File) Stat() (FileInfo, error) { if file == nil { return nil, ErrInvalid } return statHandle(file.name, file.pfd.Sysfd) } // stat implements both Stat and Lstat of a file. func stat(funcname, name string, followSurrogates bool) (FileInfo, error) { if len(name) == 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 18:44:48 UTC 2024 - 5.2K bytes - Viewed (0)