Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 449 for writeTime (0.13 sec)

  1. src/cmd/go/go_unix_test.go

    	// we compare the file created by "go build" against a file written explicitly
    	// by os.WriteFile.
    	//
    	// (See https://go.dev/issue/62724, https://go.dev/issue/17909.)
    	control := tg.path("control")
    	tg.creatingTemp(control)
    	if err := os.WriteFile(control, []byte("#!/bin/sh\nexit 0"), 0777); err != nil {
    		t.Fatal(err)
    	}
    	cfi, err := os.Stat(control)
    	if err != nil {
    		t.Fatal(err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 19 16:17:55 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  2. src/cmd/internal/obj/objfile_test.go

    	}
    
    	tmpdir, err := os.MkdirTemp("", "TestSymbolTooLarge")
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer os.RemoveAll(tmpdir)
    
    	src := filepath.Join(tmpdir, "p.go")
    	err = os.WriteFile(src, []byte("package p; var x [1<<32]byte"), 0666)
    	if err != nil {
    		t.Fatalf("failed to write source file: %v\n", err)
    	}
    	obj := filepath.Join(tmpdir, "p.o")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:21:30 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/term/terminal.go

    	t.queue(op)
    }
    
    const maxLineLength = 4096
    
    func (t *Terminal) setLine(newLine []rune, newPos int) {
    	if t.echo {
    		t.moveCursorToPos(0)
    		t.writeLine(newLine)
    		for i := len(newLine); i < len(t.line); i++ {
    			t.writeLine(space)
    		}
    		t.moveCursorToPos(newPos)
    	}
    	t.line = newLine
    	t.pos = newPos
    }
    
    func (t *Terminal) advanceCursor(places int) {
    	t.cursorX += places
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 22 17:16:14 UTC 2022
    - 22.5K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. build-logic/kotlin-dsl/src/main/kotlin/gradlebuild/kotlindsl/generator/tasks/CodeGenerationTask.kt

        @Suppress("unused")
        @TaskAction
        fun run() {
            outputDir.get().asFile.apply {
                recreate()
                writeFiles()
            }
        }
    
        protected
        fun File.writeFile(relativePath: String, text: String) {
            resolve(relativePath).apply {
                parentFile.mkdirs()
                writeText(text)
            }
        }
    
        private
        fun File.recreate() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Sep 30 16:17:26 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  10. test/fixedbugs/issue21576.go

      c <- 1
    }
    `
    
    func main() {
    	dir, err := ioutil.TempDir("", "21576")
    	if err != nil {
    		log.Fatal(err)
    	}
    	defer os.RemoveAll(dir)
    
    	file := filepath.Join(dir, "main.go")
    	if err := ioutil.WriteFile(file, []byte(prog), 0655); err != nil {
    		log.Fatalf("Write error %v", err)
    	}
    
    	// Using a timeout of 1 minute in case other factors might slow
    	// down the start of "go run". See https://golang.org/issue/34836.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 1.3K bytes
    - Viewed (0)
Back to top