- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 33 for ErrInvalid (0.27 sec)
-
src/testing/fstest/mapfs.go
return 0, &fs.PathError{Op: "seek", Path: f.path, Err: fs.ErrInvalid} } f.offset = offset return offset, nil } func (f *openMapFile) ReadAt(b []byte, offset int64) (int, error) { if offset < 0 || offset > int64(len(f.f.Data)) { return 0, &fs.PathError{Op: "read", Path: f.path, Err: fs.ErrInvalid} } n := copy(b, f.f.Data[offset:]) if n < len(b) { return n, io.EOF }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 7.1K bytes - Viewed (0) -
src/os/stat_unix.go
import ( "syscall" ) // Stat returns the [FileInfo] structure describing file. // If there is an error, it will be of type [*PathError]. func (f *File) Stat() (FileInfo, error) { if f == nil { return nil, ErrInvalid } var fs fileStat err := f.pfd.Fstat(&fs.sys) if err != nil { return nil, f.wrapErr("stat", err) } fillFileStatFromSys(&fs, f.name) return &fs, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 22:38:03 UTC 2024 - 1.2K bytes - Viewed (0) -
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) -
cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go
if kubeConfigDir == "" { return errors.Errorf("%s: kubeConfigDir was empty", errInvalid) } if kubeadmConfig == nil { return errors.Errorf("%s: kubeadmConfig was nil", errInvalid) } if name == "" { return errors.Errorf("%s: name was empty", errInvalid) } if spec == nil { return errors.Errorf("%s: spec was nil", errInvalid) } kubeConfigPath := filepath.Join(kubeConfigDir, name)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 07 17:04:18 UTC 2024 - 27K 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/embed/embed.go
return 0, &fs.PathError{Op: "seek", Path: f.f.name, Err: fs.ErrInvalid} } f.offset = offset return offset, nil } func (f *openFile) ReadAt(b []byte, offset int64) (int, error) { if offset < 0 || offset > int64(len(f.f.data)) { return 0, &fs.PathError{Op: "read", Path: f.f.name, Err: fs.ErrInvalid} } n := copy(b, f.f.data[offset:]) if n < len(b) { return n, io.EOF }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 19:42:51 UTC 2024 - 13.5K bytes - Viewed (0)