- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for OpenFile (0.08 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: 2024-11-03 19:28 - Last Modified: 2022-01-02 17:15 - 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: 2024-11-03 19:28 - Last Modified: 2024-02-15 01:09 - 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: 2024-11-03 19:28 - Last Modified: 2021-08-19 01:35 - 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: 2024-11-03 19:28 - Last Modified: 2022-01-02 17:15 - 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: 2024-11-03 19:28 - Last Modified: 2023-12-09 18:17 - 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: 2024-11-03 19:28 - Last Modified: 2023-10-18 18:08 - 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: 2024-11-03 19:28 - Last Modified: 2023-06-17 14:31 - 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: 2024-11-03 19:28 - Last Modified: 2023-06-17 14:31 - 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: 2024-11-05 11:13 - Last Modified: 2024-06-21 19:58 - 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: 2024-11-03 19:28 - Last Modified: 2024-10-01 15:19 - 23.1K bytes - Viewed (0)