Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 447 for writeFiles (0.19 sec)

  1. src/runtime/trace/trace_test.go

    		t.Fatalf("succeed to start tracing second time")
    	}
    	Stop()
    	Stop()
    }
    
    func saveTrace(t *testing.T, buf *bytes.Buffer, name string) {
    	if !*saveTraces {
    		return
    	}
    	if err := os.WriteFile(name+".trace", buf.Bytes(), 0600); err != nil {
    		t.Errorf("failed to write trace file: %s", err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 16:44:47 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/ops/gen/common/controller.h

    namespace tensorflow {
    namespace generator {
    
    class Controller {
     public:
      explicit Controller(PathConfig path_config, Env* env = Env::Default());
      virtual ~Controller();
      const void WriteFile(const string& file_path, const SourceCode& code) const;
      const std::vector<OpSpec>& GetModelOps() const;
    
     private:
      void InitializeOpApi();
      void BuildModel();
    
      // Data model: Ops to generate
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jun 21 18:51:25 UTC 2021
    - 1.8K bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/testlife/life_test.go

    	if err := cgotest.OverlayDir(modRoot, "testdata"); err != nil {
    		log.Panic(err)
    	}
    	if err := os.Chdir(modRoot); err != nil {
    		log.Panic(err)
    	}
    	os.Setenv("PWD", modRoot)
    	if err := os.WriteFile("go.mod", []byte("module cgolife\n"), 0666); err != nil {
    		log.Panic(err)
    	}
    
    	return m.Run()
    }
    
    // TestTestRun runs a test case for cgo //export.
    func TestTestRun(t *testing.T) {
    	testenv.MustHaveGoRun(t)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 22 20:56:09 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  4. src/cmd/go/testdata/script/mod_test_cached.txt

    import (
    	"os"
    	"path/filepath"
    	"testing"
    )
    
    func TestWriteTmp(t *testing.T) {
    	dir, err := os.MkdirTemp("", "")
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer os.RemoveAll(dir)
    	err = os.WriteFile(filepath.Join(dir, "x"), nil, 0666)
    	if err != nil {
    		t.Fatal(err)
    	}
    }
    
    func TestReadTestdata(t *testing.T) {
    	_, err := os.ReadFile("testdata/foo.txt")
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 09 19:12:23 UTC 2020
    - 1.5K bytes
    - Viewed (0)
  5. src/math/big/link_test.go

    	}
    	t.Parallel()
    	tmp := t.TempDir()
    	goBin := testenv.GoToolPath(t)
    	goFile := filepath.Join(tmp, "x.go")
    	file := []byte(`package main
    import _ "math/big"
    func main() {}
    `)
    	if err := os.WriteFile(goFile, file, 0644); err != nil {
    		t.Fatal(err)
    	}
    	cmd := exec.Command(goBin, "build", "-o", "x.exe", "x.go")
    	cmd.Dir = tmp
    	if out, err := cmd.CombinedOutput(); err != nil {
    		t.Fatalf("compile: %v, %s", err, out)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 24 15:51:26 UTC 2021
    - 1.4K bytes
    - Viewed (0)
  6. test/fixedbugs/issue52127.go

    		panic(err)
    	}
    	defer os.RemoveAll(dir)
    
    	args := []string{"go", "build"}
    	write := func(prefix string, i int, data string) {
    		filename := filepath.Join(dir, fmt.Sprintf("%s%d.go", prefix, i))
    		if err := os.WriteFile(filename, []byte(data), 0o644); err != nil {
    			panic(err)
    		}
    		args = append(args, filename)
    	}
    
    	for i := 0; i < 100; i++ {
    		write("a", i, `package p
    `)
    	}
    	for i := 0; i < 100; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  7. src/cmd/go/help_test.go

    	}
    	diff := diff.Diff(srcPath, old, "go help documentation | gofmt", alldocs)
    	if diff == nil {
    		t.Logf("%s is up to date.", srcPath)
    		return
    	}
    
    	if *fixDocs {
    		if err := os.WriteFile(srcPath, alldocs, 0666); err != nil {
    			t.Fatal(err)
    		}
    		t.Logf("wrote %d bytes to %s", len(alldocs), srcPath)
    	} else {
    		t.Logf("\n%s", diff)
    		t.Errorf("%s is stale. To update, run 'go generate cmd/go'.", srcPath)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 28 15:45:49 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb/SmbNamedPipe.java

     * <li><code>TransactNamedPipe</code> A message-type pipe call that
     * writes to and reads from an existing pipe descriptor in one operation.
     * <li><code>CreateFile</code>, <code>ReadFile</code>,
     * <code>WriteFile</code>, and <code>CloseFile</code> A byte-type pipe can
     * be opened, written to, read from and closed using the standard Win32
     * file operations.
     * </ul>
     *
     * <p>
    Registered: Wed Jun 12 15:45:55 UTC 2024
    - Last Modified: Sun Jul 01 13:12:10 UTC 2018
    - 6K bytes
    - Viewed (0)
  9. src/internal/coverage/cfile/ts_test.go

    // present in the coverage report from F.
    func genAuxMeta(t *testing.T, dstdir string) (string, string) {
    	// Do a GOCOVERDIR=<tmp> go run hello.go
    	src := filepath.Join(dstdir, "hello.go")
    	if err := os.WriteFile(src, []byte(hellogo), 0777); err != nil {
    		t.Fatalf("write failed: %v", err)
    	}
    	args := []string{"run", "-covermode=" + testing.CoverMode(), src}
    	cmd := exec.Command(testenv.GoToolPath(t), args...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:58:07 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  10. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/FileLock.java

    import java.io.Closeable;
    import java.io.File;
    
    public interface FileLock extends Closeable, FileAccess {
        /**
         * Returns true if the most recent mutation method ({@link #updateFile(Runnable)} or {@link #writeFile(Runnable)} attempted by any process succeeded
         * (ie a process did not crash while updating the target file).
         *
         * Returns false if no mutation method has ever been called for the target file.
         */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:08:47 UTC 2023
    - 1.8K bytes
    - Viewed (0)
Back to top