- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for OpenFile (0.05 sec)
-
internal/lock/lock_solaris.go
// flags and shouldn't be considered as replacement // for os.OpenFile(). func LockedOpenFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { return lockedOpenFile(path, flag, perm, syscall.F_SETLKW) } // Open - Call os.OpenFile func Open(path string, flag int, perm os.FileMode) (*os.File, error) { return os.OpenFile(path, flag, perm)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 2.8K bytes - Viewed (0) -
cmd/os-instrumented.go
return RenameSys(src, dst) } // OpenFile captures time taken to call os.OpenFile func OpenFile(name string, flag int, perm os.FileMode) (f *os.File, err error) { switch flag & writeMode { case writeMode: defer updateOSMetrics(osMetricOpenFileW, name)(err) default: defer updateOSMetrics(osMetricOpenFileR, name)(err) } return os.OpenFile(name, flag, perm) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 15 01:09:38 UTC 2024 - 6.3K bytes - Viewed (0) -
internal/lock/lock_nix.go
// flags and shouldn't be considered as replacement // for os.OpenFile(). func LockedOpenFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { return lockedOpenFile(path, flag, perm, 0) } // Open - Call os.OpenFile func Open(path string, flag int, perm os.FileMode) (*os.File, error) { return os.OpenFile(path, flag, perm)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 19 01:35:22 UTC 2021 - 2.8K bytes - Viewed (0) -
internal/ioutil/append-file_nix.go
func AppendFile(dst string, src string, osync bool) error { flags := os.O_WRONLY | os.O_APPEND | os.O_CREATE if osync { flags |= os.O_SYNC } appendFile, err := os.OpenFile(dst, flags, 0o666) if err != nil { return err } defer appendFile.Close() srcFile, err := os.Open(src) if err != nil { return err } defer srcFile.Close()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 1.3K bytes - Viewed (0) -
internal/ioutil/read_file.go
OpenFileDirectIO = disk.OpenFileDirectIO // OsOpen allows overriding default function. OsOpen = os.Open // OsOpenFile allows overriding default function. OsOpenFile = os.OpenFile ) // ReadFileWithFileInfo reads the named file and returns the contents. // A successful call returns err == nil, not err == EOF. // Because ReadFile reads the whole file, it does not treat an EOF from Read
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Dec 09 18:17:51 UTC 2023 - 2.3K bytes - Viewed (0) -
internal/disk/directio_unsupported.go
// see this ZFS-on-Linux commit message: // https://github.com/openzfs/zfs/commit/a584ef26053065f486d46a7335bea222cb03eeea // OpenFileDirectIO wrapper around os.OpenFile nothing special func OpenFileDirectIO(filePath string, flag int, perm os.FileMode) (*os.File, error) { return os.OpenFile(filePath, flag, perm) } // DisableDirectIO is a no-op func DisableDirectIO(f *os.File) error { return nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Oct 18 18:08:15 UTC 2023 - 2.6K bytes - Viewed (0) -
internal/disk/directio_darwin.go
const ODirectPlatform = true // OpenFileDirectIO - bypass kernel cache. func OpenFileDirectIO(filePath string, flag int, perm os.FileMode) (*os.File, error) { return directio.OpenFile(filePath, flag, perm) } // DisableDirectIO - disables directio mode. func DisableDirectIO(f *os.File) error { fd := f.Fd() _, err := unix.FcntlInt(fd, unix.F_NOCACHE, 0) return err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Jun 17 14:31:36 UTC 2023 - 1.4K bytes - Viewed (0) -
internal/disk/directio_unix.go
const ODirectPlatform = true // OpenFileDirectIO - bypass kernel cache. func OpenFileDirectIO(filePath string, flag int, perm os.FileMode) (*os.File, error) { return directio.OpenFile(filePath, flag, perm) } // DisableDirectIO - disables directio mode. func DisableDirectIO(f *os.File) error { fd := f.Fd() flag, err := unix.FcntlInt(fd, unix.F_GETFL, 0) if err != nil { return err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Jun 17 14:31:36 UTC 2023 - 1.6K bytes - Viewed (0) -
src/cmd/buildid/buildid.go
if len(newID) != len(id) { log.Fatalf("%s: build ID length mismatch %q vs %q", file, id, newID) } if len(matches) == 0 { return } f, err = os.OpenFile(file, os.O_RDWR, 0) if err != nil { log.Fatal(err) } if err := buildid.Rewrite(f, matches, newID); err != nil { log.Fatal(err) } if err := f.Close(); err != nil { log.Fatal(err) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Jun 21 19:58:04 UTC 2024 - 1.7K bytes - Viewed (0) -
cmd/erasure-healing-common_test.go
// and check if that disk // appears in outDatedDisks. tamperedIndex = index filePath := pathJoin(erasureDisks[index].String(), bucket, object, fi.DataDir, "part.1") f, err := os.OpenFile(filePath, os.O_WRONLY|os.O_SYNC, 0) if err != nil { t.Fatalf("Failed to open %s: %s\n", filePath, err) } f.WriteString("oops") // Will cause bitrot error f.Close() break }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 01 15:19:10 UTC 2024 - 23.1K bytes - Viewed (0)