- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for osErrToFileErr (0.09 sec)
-
cmd/os_unix.go
func readDirFn(dirPath string, fn func(name string, typ os.FileMode) error) error { fd, err := openFileWithFD(dirPath, readMode, 0o666) if err != nil { if osErrToFileErr(err) == errFileNotFound { return nil } if !osIsPermission(err) { return osErrToFileErr(err) } // There may be permission error when dirPath // is at the root of the disk mount that may // not have the permissions to avoid 'noatime'
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 9.3K bytes - Viewed (0) -
cmd/os_other.go
d, err := Open(dirPath) if err != nil { if osErrToFileErr(err) == errFileNotFound { return nil } return osErrToFileErr(err) } defer d.Close() maxEntries := 1000 for { // Read up to max number of entries. fis, err := d.Readdir(maxEntries) if err != nil { if err == io.EOF { break } err = osErrToFileErr(err) if err == errFileNotFound { return nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Sep 13 15:14:36 UTC 2023 - 4K bytes - Viewed (0) -
cmd/os_windows.go
for ; ; err = syscall.FindNextFile(handle, data) { if err != nil { if err == syscall.ERROR_NO_MORE_FILES { break } else { if isSysErrPathNotFound(err) { return nil } err = osErrToFileErr(&os.PathError{ Op: "FindNextFile", Path: dirPath, Err: err, }) if err == errFileNotFound { return nil } return err } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Oct 18 18:08:15 UTC 2023 - 5.1K bytes - Viewed (0) -
cmd/storage-errors.go
// Is a one place function which converts all os.PathError // into a more FS object layer friendly form, converts // known errors into their typed form for top level // interpretation. func osErrToFileErr(err error) error { if err == nil { return nil } if osIsNotExist(err) { return errFileNotFound } if osIsPermission(err) { return errFileAccessDenied }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Apr 04 12:04:40 UTC 2024 - 6.4K bytes - Viewed (0) -
cmd/os-reliable.go
// This is a special case should be handled only for // windows, because windows API does not return "not a // directory" error message. Handle this specifically here. return errFileAccessDenied } return osErrToFileErr(err) } return nil } // Reliably retries os.MkdirAll if for some reason os.MkdirAll returns // syscall.ENOENT (parent does not exist).
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Apr 22 17:49:30 UTC 2024 - 5.8K bytes - Viewed (0)