- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 172 for O_WRONLY (0.17 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/covdata/metamerge.go
} defer inf.Close() fi, err := inf.Stat() if err != nil { fatal("accessing input meta-data file %s: %v", inpath, err) } outf, err := os.OpenFile(outpath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, fi.Mode()) if err != nil { fatal("opening output meta-data file %s: %v", outpath, err) } _, err = io.Copy(outf, inf) outf.Close() if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 12 17:17:47 UTC 2024 - 12.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/main/java/jcifs/smb/SmbCopyUtil.java
*/ static SmbFileHandleImpl openCopyTargetFile ( SmbFile dest, int attrs, boolean alsoRead ) throws CIFSException { try { return dest.openUnshared( SmbConstants.O_CREAT | SmbConstants.O_WRONLY | SmbConstants.O_TRUNC, SmbConstants.FILE_WRITE_DATA | SmbConstants.FILE_WRITE_ATTRIBUTES | ( alsoRead ? SmbConstants.FILE_READ_DATA : 0 ), SmbConstants.FILE_NO_SHARE, attrs,
Registered: Wed Jun 12 15:45:55 UTC 2024 - Last Modified: Tue Jul 07 10:52:42 UTC 2020 - 17.1K 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)