Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 65 for O_WRONLY (0.25 sec)

  1. src/syscall/syscall_linux.go

    }
    
    func Chown(path string, uid int, gid int) (err error) {
    	return Fchownat(_AT_FDCWD, path, uid, gid, 0)
    }
    
    func Creat(path string, mode uint32) (fd int, err error) {
    	return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
    }
    
    func EpollCreate(size int) (fd int, err error) {
    	if size <= 0 {
    		return -1, EINVAL
    	}
    	return EpollCreate1(0)
    }
    
    func isGroupMember(gid int) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 20:12:46 UTC 2024
    - 35.7K bytes
    - Viewed (0)
  2. src/cmd/go/go_test.go

    			// Otherwise, copy the bytes.
    			src, err := os.Open(testExe)
    			if err != nil {
    				log.Fatal(err)
    			}
    			defer src.Close()
    
    			dst, err := os.OpenFile(testGo, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0o777)
    			if err != nil {
    				log.Fatal(err)
    			}
    
    			_, err = io.Copy(dst, src)
    			if closeErr := dst.Close(); err == nil {
    				err = closeErr
    			}
    			if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 81.1K bytes
    - Viewed (0)
  3. src/crypto/tls/handshake_server_test.go

    		if err := test.validate(connState); err != nil {
    			t.Fatalf("validate callback returned error: %s", err)
    		}
    	}
    
    	if write {
    		path := test.dataPath()
    		out, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
    		if err != nil {
    			t.Fatalf("Failed to create output file: %s", err)
    		}
    		defer out.Close()
    		recordingConn.Close()
    		if len(recordingConn.flows) < 3 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 64.7K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/sys/windows/types_windows.go

    // NTStatus corresponds with NTSTATUS, error values returned by ntdll.dll and
    // other native functions.
    type NTStatus uint32
    
    const (
    	// Invented values to support what package os expects.
    	O_RDONLY   = 0x00000
    	O_WRONLY   = 0x00001
    	O_RDWR     = 0x00002
    	O_CREAT    = 0x00040
    	O_EXCL     = 0x00080
    	O_NOCTTY   = 0x00100
    	O_TRUNC    = 0x00200
    	O_NONBLOCK = 0x00800
    	O_APPEND   = 0x00400
    	O_SYNC     = 0x01000
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 05 22:18:42 UTC 2024
    - 104.1K bytes
    - Viewed (0)
  5. src/os/exec/exec.go

    //
    // If w is nil, writerDescriptor returns a File that writes to os.DevNull.
    func (c *Cmd) writerDescriptor(w io.Writer) (*os.File, error) {
    	if w == nil {
    		f, err := os.OpenFile(os.DevNull, os.O_WRONLY, 0)
    		if err != nil {
    			return nil, err
    		}
    		c.childIOFiles = append(c.childIOFiles, f)
    		return f, nil
    	}
    
    	if f, ok := w.(*os.File); ok {
    		return f, nil
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:53 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux.go

    	OVERLAYFS_SUPER_MAGIC                       = 0x794c7630
    	O_ACCMODE                                   = 0x3
    	O_RDONLY                                    = 0x0
    	O_RDWR                                      = 0x2
    	O_WRONLY                                    = 0x1
    	PACKET_ADD_MEMBERSHIP                       = 0x1
    	PACKET_AUXDATA                              = 0x8
    	PACKET_BROADCAST                            = 0x1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 185.8K bytes
    - Viewed (0)
  7. cmd/xl-storage_test.go

    		t.Fatal(err)
    	}
    
    	// 4) Streaming bitrot check on corrupted file
    	filePath := pathJoin(storage.String(), volName, fileName)
    	f, err := os.OpenFile(filePath, os.O_WRONLY|os.O_SYNC, 0o644)
    	if err != nil {
    		t.Fatal(err)
    	}
    	// Replace first 256 with 'a'.
    	if _, err := f.WriteString(strings.Repeat("a", 256)); err != nil {
    		t.Fatal(err)
    	}
    	f.Close()
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Apr 11 17:45:28 UTC 2024
    - 66.7K bytes
    - Viewed (0)
  8. src/cmd/internal/testdir/testdir_test.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: Thu Mar 21 20:08:06 UTC 2024
    - 57.5K bytes
    - Viewed (0)
  9. cmd/test-utils_test.go

    			extractedFilePath := filepath.Join(targetDir, file.Name)
    			if file.FileInfo().IsDir() {
    				return os.MkdirAll(extractedFilePath, file.Mode())
    			}
    			outputFile, err := os.OpenFile(extractedFilePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, file.Mode())
    			if err != nil {
    				return err
    			}
    			defer outputFile.Close()
    			_, err = io.Copy(outputFile, zippedFile)
    			return err
    		}()
    		if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 76.9K bytes
    - Viewed (0)
  10. src/net/dnsclient_unix_test.go

    		resolverConfig: &resolvConf,
    	}
    	conf.initOnce.Do(conf.init)
    	return conf, nil
    }
    
    func (conf *resolvConfTest) write(lines []string) error {
    	f, err := os.OpenFile(conf.path, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0600)
    	if err != nil {
    		return err
    	}
    	if _, err := f.WriteString(strings.Join(lines, "\n")); err != nil {
    		f.Close()
    		return err
    	}
    	f.Close()
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 72.4K bytes
    - Viewed (0)
Back to top