- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 154 for openPipe (0.27 sec)
-
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 Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Aug 19 01:35:22 UTC 2021 - 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 Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Feb 15 01:09:38 UTC 2024 - 6.3K bytes - Viewed (0) -
src/os/fifo_test.go
if err := syscall.Mkfifo(name, 0o600); err != nil { t.Fatal(err) } // The problem only occurs if we use O_NONBLOCK here. rd, err := os.OpenFile(name, os.O_RDONLY|syscall.O_NONBLOCK, 0o600) if err != nil { t.Fatal(err) } wr, err := os.OpenFile(name, os.O_WRONLY|syscall.O_NONBLOCK, 0o600) if err != nil { t.Fatal(err) } const msg = "message"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 11:47:23 UTC 2024 - 6.1K bytes - Viewed (0) -
src/os/exec/lp_unix_test.go
"testing" ) func TestLookPathUnixEmptyPath(t *testing.T) { // Not parallel: uses Chdir and Setenv. tmp := t.TempDir() chdir(t, tmp) f, err := os.OpenFile("exec_me", os.O_CREATE|os.O_EXCL, 0700) if err != nil { t.Fatal("OpenFile failed: ", err) } err = f.Close() if err != nil { t.Fatal("Close failed: ", err) } t.Setenv("PATH", "") path, err := exec.LookPath("exec_me")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 13 18:19:21 UTC 2023 - 762 bytes - Viewed (0) -
src/embed/embed.go
} ofile, ok := file.(*openFile) if !ok { return nil, &fs.PathError{Op: "read", Path: name, Err: errors.New("is a directory")} } return []byte(ofile.f.data), nil } // An openFile is a regular file open for reading. type openFile struct { f *file // the file itself offset int64 // current read offset } var ( _ io.Seeker = (*openFile)(nil) _ io.ReaderAt = (*openFile)(nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 19:42:51 UTC 2024 - 13.5K bytes - Viewed (0) -
src/internal/poll/error_linux_test.go
"syscall" ) func badStateFile() (*os.File, error) { if os.Getuid() != 0 { return nil, errors.New("must be root") } // Using OpenFile for a device file is an easy way to make a // file attached to the runtime-integrated network poller and // configured in halfway. return os.OpenFile("/dev/net/tun", os.O_RDWR, 0) } func isBadStateFileError(err error) (string, bool) { switch err { case poll.ErrNotPollable, syscall.EBADFD:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 13 08:53:02 UTC 2019 - 748 bytes - Viewed (0) -
src/cmd/go/internal/lockedfile/mutex.go
// file at mu.Path is write-only, the call to OpenFile will fail with a // permission error. That's actually what we want: if we add an RLock method // in the future, it should call OpenFile with O_RDONLY and will require the // files must be readable, so we should not let the caller make any // assumptions about Mutex working with write-only files. f, err := OpenFile(mu.Path, os.O_RDWR|os.O_CREATE, 0666) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 17:17:40 UTC 2019 - 2.3K bytes - Viewed (0) -
cmd/kubeadm/app/phases/upgrade/postupgrade_test.go
certPath := filepath.Join(tmpdir, constants.APIServerCertName) certFile, err := os.OpenFile(certPath, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0666) if err != nil { t.Fatalf("Failed to create cert file %s: %v", certPath, err) } certFile.Close() keyPath := filepath.Join(tmpdir, constants.APIServerKeyName) keyFile, err := os.OpenFile(keyPath, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0666) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jan 15 11:40:04 UTC 2024 - 7.2K bytes - Viewed (0) -
src/cmd/go/internal/modload/stat_openfile.go
import ( "io/fs" "os" ) // hasWritePerm reports whether the current user has permission to write to the // file with the given info. func hasWritePerm(path string, _ fs.FileInfo) bool { if f, err := os.OpenFile(path, os.O_WRONLY, 0); err == nil { f.Close() return true } return false
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 12 16:45:11 UTC 2022 - 791 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 Jun 16 00:44:34 UTC 2024 - Last Modified: Wed Oct 18 18:08:15 UTC 2023 - 2.6K bytes - Viewed (0)