- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 53 for O_WRONLY (0.1 sec)
-
cmd/kubeadm/app/util/copy.go
if err != nil { return err } sourceFile, err := os.Open(src) if err != nil { return err } defer func() { _ = sourceFile.Close() }() destFile, err := os.OpenFile(dest, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, sourceFileInfo.Mode()) if err != nil { return err } defer func() { _ = destFile.Close() }() _, err = io.Copy(destFile, sourceFile) return err }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Feb 22 01:42:57 UTC 2024 - 1.9K bytes - Viewed (0) -
src/internal/poll/fd_io_plan9.go
// the Wait function to return. func (aio *asyncIO) Cancel() { aio.mu.Lock() defer aio.mu.Unlock() if aio.pid == -1 { return } f, e := syscall.Open("/proc/"+itoa.Itoa(aio.pid)+"/note", syscall.O_WRONLY) if e != nil { return } syscall.Write(f, []byte("hangup")) syscall.Close(f) } // Wait for the I/O operation to complete. func (aio *asyncIO) Wait() (int, error) { res := <-aio.res
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Mar 14 17:56:50 UTC 2021 - 2.1K bytes - Viewed (0) -
src/main/java/jcifs/SmbPipeResource.java
*/ public static final int PIPE_TYPE_RDONLY = SmbConstants.O_RDONLY; /** * The pipe should be opened only for writing. */ public static final int PIPE_TYPE_WRONLY = SmbConstants.O_WRONLY; /** * The pipe should be opened for both reading and writing. */ public static final int PIPE_TYPE_RDWR = SmbConstants.O_RDWR; /**
Registered: Wed Jun 12 15:45:55 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 2.1K bytes - Viewed (0) -
src/cmd/go/internal/lockedfile/lockedfile.go
// (When we close a File, it must be the same file descriptor that we opened!) type osFile struct { *os.File } // OpenFile is like os.OpenFile, but returns a locked file. // If flag includes os.O_WRONLY or os.O_RDWR, the file is write-locked; // otherwise, it is read-locked. func OpenFile(name string, flag int, perm fs.FileMode) (*File, error) { var ( f = new(File) err error )
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 20 18:41:18 UTC 2020 - 5.1K bytes - Viewed (0) -
src/cmd/go/testdata/script/test_fuzz_mutator_repeat.txt
var wantFlag = flag.String("want", "", "file containing previous crashing input") func FuzzRepeat(f *testing.F) { i := 0 f.Fuzz(func(t *testing.T, b []byte) { i++ if i == 100 { f, err := os.OpenFile("want", os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0666) if err != nil { // Couldn't create the file. Return without crashing, and try // again. i-- t.Skip(err) } if _, err := f.Write(b); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 16 16:53:11 UTC 2023 - 2K bytes - Viewed (0) -
src/cmd/cgo/internal/cgotest/overlaydir.go
return nil } // Otherwise, copy the bytes. src, err := os.Open(srcPath) if err != nil { return err } defer src.Close() dst, err := os.OpenFile(dstPath, os.O_WRONLY|os.O_CREATE|os.O_EXCL, perm) if err != nil { return err } _, err = io.Copy(dst, src) if closeErr := dst.Close(); err == nil { err = closeErr } return err })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 22 20:56:09 UTC 2023 - 1.7K bytes - Viewed (0) -
cmd/yamlfmt/yamlfmt.go
continue } rootNode, err := fetchYaml(sourceYaml) if err != nil { fmt.Fprintf(os.Stderr, "%s: %v\n", path, err) continue } writer, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666) if err != nil { fmt.Fprintf(os.Stderr, "%s: %v\n", path, err) continue } err = streamYaml(writer, indent, rootNode) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 17 06:23:22 UTC 2023 - 1.7K bytes - Viewed (0) -
src/internal/coverage/test/counter_test.go
// Open a counter data file in preparation for emitting data. d := t.TempDir() cfpath := filepath.Join(d, fmt.Sprintf("covcounters.hash.0.%d", kf)) of, err := os.OpenFile(cfpath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666) if err != nil { t.Fatalf("opening covcounters: %v", err) } // Perform the encode and write. cdfw := encodecounter.NewCoverageDataWriter(of, flav) if cdfw == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 26 12:44:34 UTC 2023 - 6.2K bytes - Viewed (0) -
tools/istio-iptables/pkg/dependencies/stub.go
func (s *DependenciesStub) writeAllToDryRunPath() error { path := DryRunFilePath.Get() if path != "" { // Print the input into the given output file. f, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY, 0o644) if err != nil { return fmt.Errorf("unable to open dry run output file %v: %v", path, err) } defer f.Close() for _, line := range s.ExecutedAll { _, err := f.WriteString(line + "\n")
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Mar 11 17:46:23 UTC 2024 - 3.4K bytes - Viewed (0) -
src/runtime/export_unix_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat May 20 21:27:51 UTC 2023 - 2.3K bytes - Viewed (0)