- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 104 for PathError (0.13 sec)
-
src/os/file_plan9.go
// EPLAN9 error, wrapped in *PathError. func Chown(name string, uid, gid int) error { return &PathError{Op: "chown", Path: name, Err: syscall.EPLAN9} } // Lchown changes the numeric uid and gid of the named file. // If the file is a symbolic link, it changes the uid and gid of the link itself. // If there is an error, it will be of type *PathError. func Lchown(name string, uid, gid int) error {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 30 15:35:30 UTC 2024 - 16K bytes - Viewed (0) -
src/os/error_windows_test.go
isExistTests = append(isExistTests, isExistTest{err: &fs.PathError{Err: syscall.ERROR_FILE_NOT_FOUND}, is: false, isnot: true}, isExistTest{err: &os.LinkError{Err: syscall.ERROR_FILE_NOT_FOUND}, is: false, isnot: true}, isExistTest{err: &os.SyscallError{Err: syscall.ERROR_FILE_NOT_FOUND}, is: false, isnot: true}, isExistTest{err: &fs.PathError{Err: _ERROR_BAD_NETPATH}, is: false, isnot: true},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 1.7K bytes - Viewed (0) -
src/os/error_unix_test.go
) isPermissionTests = append(isPermissionTests, isPermissionTest{err: &fs.PathError{Err: syscall.EACCES}, want: true}, isPermissionTest{err: &fs.PathError{Err: syscall.EPERM}, want: true}, isPermissionTest{err: &fs.PathError{Err: syscall.EEXIST}, want: false}, isPermissionTest{err: &os.LinkError{Err: syscall.EACCES}, want: true},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 07 23:34:21 UTC 2023 - 1.5K bytes - Viewed (0) -
src/os/error_test.go
type isExistTest struct { err error is bool isnot bool } var isExistTests = []isExistTest{ {&fs.PathError{Err: fs.ErrInvalid}, false, false}, {&fs.PathError{Err: fs.ErrPermission}, false, false}, {&fs.PathError{Err: fs.ErrExist}, true, false}, {&fs.PathError{Err: fs.ErrNotExist}, false, true}, {&fs.PathError{Err: fs.ErrClosed}, false, false}, {&os.LinkError{Err: fs.ErrInvalid}, false, false},
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/example_test.go
fmt.Println(err) } } // Output: // file does not exist } func ExampleAs() { if _, err := os.Open("non-existing"); err != nil { var pathError *fs.PathError if errors.As(err, &pathError) { fmt.Println("Failed at path:", pathError.Path) } else { fmt.Println(err) } } // Output: // Failed at path: non-existing } func ExampleUnwrap() { err1 := errors.New("error1")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 16 02:08:40 UTC 2023 - 2.2K bytes - Viewed (0) -
src/os/dir_plan9.go
d.bufp, d.nbuf = 0, nb if err != nil { if err == io.EOF { break } return names, dirents, infos, &PathError{Op: "readdir", Path: file.name, Err: err} } if nb < syscall.STATFIXLEN { return names, dirents, infos, &PathError{Op: "readdir", Path: file.name, Err: syscall.ErrShortStat} } } // Get a record from the buffer. b := d.buf[d.bufp:]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 15 20:52:06 UTC 2024 - 2.1K bytes - Viewed (0) -
src/os/path_test.go
} defer f.Close() // Can't make directory named after file. err = MkdirAll(fpath, 0777) if err == nil { t.Fatalf("MkdirAll %q: no error", fpath) } perr, ok := err.(*PathError) if !ok { t.Fatalf("MkdirAll %q returned %T, not *PathError", fpath, err) } if filepath.Clean(perr.Path) != filepath.Clean(fpath) { t.Fatalf("MkdirAll %q returned wrong error path: %q not %q", fpath, filepath.Clean(perr.Path), filepath.Clean(fpath))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 19 20:45:37 UTC 2023 - 3K bytes - Viewed (0) -
src/cmd/go/internal/lockedfile/internal/filelock/filelock_other.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 17 02:24:35 UTC 2023 - 563 bytes - Viewed (0) -
src/os/file.go
// bits (before umask). // If there is an error, it will be of type *PathError. func Mkdir(name string, perm FileMode) error { longName := fixLongPath(name) e := ignoringEINTR(func() error { return syscall.Mkdir(longName, syscallMode(perm)) }) if e != nil { return &PathError{Op: "mkdir", Path: name, Err: e} } // mkdir(2) itself won't handle the sticky bit on *BSD and Solaris
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 23:07:37 UTC 2024 - 25.4K bytes - Viewed (0) -
src/os/stat_unix.go
}) if err != nil { return nil, &PathError{Op: "stat", Path: name, Err: err} } fillFileStatFromSys(&fs, name) return &fs, nil } // lstatNolog lstats a file with no test logging. func lstatNolog(name string) (FileInfo, error) { var fs fileStat err := ignoringEINTR(func() error { return syscall.Lstat(name, &fs.sys) }) if err != nil { return nil, &PathError{Op: "lstat", Path: name, Err: err} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 22:38:03 UTC 2024 - 1.2K bytes - Viewed (0)