Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 172 for O_WRONLY (0.18 sec)

  1. 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)
  2. src/main/java/jcifs/smb1/smb1/SmbNamedPipe.java

         */
    
        public static final int PIPE_TYPE_RDONLY = O_RDONLY;
    
        /**
         * The pipe should be opened only for writing.
         */
    
        public static final int PIPE_TYPE_WRONLY = O_WRONLY;
    
        /**
         * The pipe should be opened for both reading and writing.
         */
    
        public static final int PIPE_TYPE_RDWR   = O_RDWR;
    
        /**
    Registered: Wed Jun 12 15:45:55 UTC 2024
    - Last Modified: Fri Mar 22 21:10:40 UTC 2019
    - 7.3K bytes
    - Viewed (0)
  3. src/os/example_test.go

    	if err := f.Close(); err != nil {
    		log.Fatal(err)
    	}
    }
    
    func ExampleOpenFile_append() {
    	// If the file doesn't exist, create it, or append to the file
    	f, err := os.OpenFile("access.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
    	if err != nil {
    		log.Fatal(err)
    	}
    	if _, err := f.Write([]byte("appended some data\n")); err != nil {
    		f.Close() // ignore error; Write error takes precedence
    		log.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 17:35:49 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  4. internal/logger/logrotate.go

    			return nil, fmt.Errorf("Failed to create log file: %w", err)
    		}
    	}
    
    	go w.listen()
    
    	return w, nil
    }
    
    func newFile(path string) (*os.File, error) {
    	return os.OpenFile(path, os.O_WRONLY|os.O_TRUNC|os.O_CREATE|os.O_SYNC, 0o666)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  5. src/os/dir.go

    		r, err := fsys.Open(path)
    		if err != nil {
    			return err
    		}
    		defer r.Close()
    		info, err := r.Stat()
    		if err != nil {
    			return err
    		}
    		w, err := OpenFile(newPath, O_CREATE|O_TRUNC|O_WRONLY, 0666|info.Mode()&0777)
    		if err != nil {
    			return err
    		}
    
    		if _, err := io.Copy(w, r); err != nil {
    			w.Close()
    			return &PathError{Op: "Copy", Path: newPath, Err: err}
    		}
    		return w.Close()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  6. src/main/java/jcifs/SmbConstants.java

         * represents is a communications device.
         */
        static final int TYPE_COMM = 0x40;
    
        /* open flags */
    
        static final int O_RDONLY = 0x01;
        static final int O_WRONLY = 0x02;
        static final int O_RDWR = 0x03;
        static final int O_APPEND = 0x04;
    
        // Open Function Encoding
        // create if the file does not exist
        static final int O_CREAT = 0x0010;
    Registered: Wed Jun 12 15:45:55 UTC 2024
    - Last Modified: Sun Jul 01 13:12:10 UTC 2018
    - 8.9K bytes
    - Viewed (0)
  7. src/os/exec/lp_windows_test.go

    func installExe(t *testing.T, dstPath string) {
    	src, err := os.Open(exePath(t))
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer src.Close()
    
    	dst, err := os.OpenFile(dstPath, os.O_CREATE|os.O_EXCL|os.O_WRONLY, 0o777)
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer func() {
    		if err := dst.Close(); err != nil {
    			t.Fatal(err)
    		}
    	}()
    
    	_, err = io.Copy(dst, src)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 19:38:12 UTC 2023
    - 16.3K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/telemetry/internal/upload/reports.go

    // If the file already exists, exclusiveWrite returns (false, nil).
    func exclusiveWrite(filename string, content []byte) (_ bool, rerr error) {
    	f, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0644)
    	if err != nil {
    		if os.IsExist(err) {
    			return false, nil
    		}
    		return false, err
    	}
    	defer func() {
    		if err := f.Close(); err != nil && rerr == nil {
    			rerr = err
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 14:52:56 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  9. src/cmd/pack/pack.go

    }
    
    func (ar *Archive) extractContents1(e *archive.Entry, out io.Writer) {
    	if ar.match(e) {
    		if verbose {
    			listEntry(e, false)
    		}
    		if out == nil {
    			f, err := os.OpenFile(e.Name, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0444 /*e.Mode*/)
    			if err != nil {
    				log.Fatal(err)
    			}
    			defer f.Close()
    			out = f
    		}
    		ar.output(e, out)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  10. src/internal/coverage/test/roundtrip_test.go

    	}
    	return res
    }
    
    func TestMetaDataWriterReader(t *testing.T) {
    	d := t.TempDir()
    
    	// Emit a meta-file...
    	mfpath := filepath.Join(d, "covmeta.hash.0")
    	of, err := os.OpenFile(mfpath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
    	if err != nil {
    		t.Fatalf("opening covmeta: %v", err)
    	}
    	//t.Logf("meta-file path is %s", mfpath)
    	blobs := createMetaDataBlobs(t, 7)
    	gran := coverage.CtrGranularityPerBlock
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 20 21:42:05 UTC 2023
    - 8.5K bytes
    - Viewed (0)
Back to top