Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for O_WRONLY (0.17 sec)

  1. 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)
  2. 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 Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 23K bytes
    - Viewed (0)
  3. src/cmd/go/internal/work/shell.go

    	// This avoids build tags and works even on systems like Plan 9
    	// where the file mask computation incorporates other information.
    	mode := perm
    	f, err := os.OpenFile(filepath.Clean(dst)+"-go-tmp-umask", os.O_WRONLY|os.O_CREATE|os.O_EXCL, perm)
    	if err == nil {
    		fi, err := f.Stat()
    		if err == nil {
    			mode = fi.Mode() & 0777
    		}
    		name := f.Name()
    		f.Close()
    		os.Remove(name)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 19.8K bytes
    - Viewed (0)
  4. src/syscall/exec_linux.go

    		}
    
    		if sys.Unshareflags&CLONE_NEWUSER != 0 && sys.GidMappings != nil {
    			dirfd = int(_AT_FDCWD)
    			if fd1, _, err1 = RawSyscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(&psetgroups[0])), uintptr(O_WRONLY), 0, 0, 0); err1 != 0 {
    				goto childerror
    			}
    			pid, _, err1 = RawSyscall(SYS_WRITE, fd1, uintptr(unsafe.Pointer(&setgroups[0])), uintptr(len(setgroups)))
    			if err1 != 0 {
    				goto childerror
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 07:45:37 UTC 2024
    - 23K bytes
    - Viewed (0)
  5. src/net/splice_linux_test.go

    	actualSize := tc.totalSize
    	if tc.limitReadSize > 0 {
    		if tc.limitReadSize < actualSize {
    			actualSize = tc.limitReadSize
    		}
    	}
    
    	f, err := os.OpenFile(os.DevNull, os.O_WRONLY, 0)
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer f.Close()
    
    	client, server := spawnTestSocketPair(t, tc.upNet)
    	defer server.Close()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:49:26 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  6. src/os/file.go

    )
    
    // Flags to OpenFile wrapping those of the underlying system. Not all
    // flags may be implemented on a given system.
    const (
    	// Exactly one of O_RDONLY, O_WRONLY, or O_RDWR must be specified.
    	O_RDONLY int = syscall.O_RDONLY // open the file read-only.
    	O_WRONLY int = syscall.O_WRONLY // open the file write-only.
    	O_RDWR   int = syscall.O_RDWR   // open the file read-write.
    	// The remaining values may be or'ed in to control behavior.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:37 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  7. src/syscall/fs_wasip1.go

    		oflags |= OFLAG_TRUNC
    	}
    	if (openmode & O_EXCL) != 0 {
    		oflags |= OFLAG_EXCL
    	}
    
    	var rights rights
    	switch openmode & (O_RDONLY | O_WRONLY | O_RDWR) {
    	case O_RDONLY:
    		rights = fileRights & ^writeRights
    	case O_WRONLY:
    		rights = fileRights & ^readRights
    	case O_RDWR:
    		rights = fileRights
    	}
    
    	var fdflags fdflags
    	if (openmode & O_APPEND) != 0 {
    		fdflags |= FDFLAG_APPEND
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  8. src/os/file_windows.go

    	r, e := syscall.Open(path, flag|syscall.O_CLOEXEC, syscallMode(perm))
    	if e != nil {
    		// We should return EISDIR when we are trying to open a directory with write access.
    		if e == syscall.ERROR_ACCESS_DENIED && (flag&O_WRONLY != 0 || flag&O_RDWR != 0) {
    			pathp, e1 := syscall.UTF16PtrFromString(path)
    			if e1 == nil {
    				var fa syscall.Win32FileAttributeData
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 30 15:38:38 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/inline/inlheur/funcprops_test.go

    // output from a "-d=dumpinlfuncprops=..." compilation.
    func genExpected(td string, testcase string) (string, error) {
    	epath := filepath.Join(td, testcase+".expected")
    	outf, err := os.OpenFile(epath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
    	if err != nil {
    		return "", err
    	}
    	gopath := "testdata/props/" + testcase + ".go"
    	content, err := os.ReadFile(gopath)
    	if err != nil {
    		return "", err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 20:15:25 UTC 2023
    - 15K bytes
    - Viewed (0)
  10. src/syscall/exec_plan9.go

    	// Write new environment variables.
    	if envv != nil {
    		for i = 0; i < len(envv); i++ {
    			r1, _, _ = RawSyscall(SYS_CREATE, uintptr(unsafe.Pointer(envv[i].name)), uintptr(O_WRONLY), uintptr(0666))
    
    			if int32(r1) == -1 {
    				goto childerror
    			}
    
    			envfd = int(r1)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 13.3K bytes
    - Viewed (0)
Back to top