- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 44 for tmp_file1 (0.14 sec)
-
src/net/http/example_test.go
// To serve a directory on disk (/tmp) under an alternate URL // path (/tmpfiles/), use StripPrefix to modify the request // URL's path before the FileServer sees it: http.Handle("/tmpfiles/", http.StripPrefix("/tmpfiles/", http.FileServer(http.Dir("/tmp")))) } func ExampleStripPrefix() { // To serve a directory on disk (/tmp) under an alternate URL // path (/tmpfiles/), use StripPrefix to modify the request
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 19 16:12:45 UTC 2021 - 5.4K bytes - Viewed (0) -
pkg/kubelet/util/store/filestore.go
// Create a temporary file in the base directory of `path` with a prefix. tmpFile, err := fs.TempFile(filepath.Dir(path), tmpPrefix) if err != nil { return err } tmpPath := tmpFile.Name() shouldClose := true defer func() { // Close the file. if shouldClose { if err := tmpFile.Close(); err != nil { if retErr == nil { retErr = fmt.Errorf("close error: %v", err)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 18 15:08:27 UTC 2022 - 3.9K bytes - Viewed (0) -
bin/retry.sh
else return 1 fi } function retry { local tmpFile tmpFile=$(mktemp) trap 'rm -f "${tmpFile}"' EXIT local failureRegex="$1" shift local n=1 local max=5 while true; do unset SHELL # Don't let environment control which shell to use if isatty; then if [ "$(uname)" == "Darwin" ]; then script -q -r "${tmpFile}" "${*}" else
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jun 11 16:08:08 UTC 2021 - 2K bytes - Viewed (0) -
src/cmd/internal/obj/riscv/asm_test.go
buf := bytes.NewBuffer(make([]byte, 0, 7000000)) genLargeBranch(buf) tmpfile := filepath.Join(dir, "x.s") if err := os.WriteFile(tmpfile, buf.Bytes(), 0644); err != nil { t.Fatalf("Failed to write file: %v", err) } // Assemble generated file. cmd := testenv.Command(t, testenv.GoToolPath(t), "tool", "asm", "-o", filepath.Join(dir, "x.o"), tmpfile) cmd.Env = append(os.Environ(), "GOARCH=riscv64", "GOOS=linux")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 22 01:50:18 UTC 2023 - 7.9K bytes - Viewed (0) -
src/cmd/internal/obj/arm64/asm_arm64_test.go
gen(buf) tmpfile := filepath.Join(dir, "x.s") err = os.WriteFile(tmpfile, buf.Bytes(), 0644) if err != nil { t.Fatalf("can't write output: %v\n", err) } pattern := `0x0080\s00128\s\(.*\)\tMOVD\t\$3,\sR3` // assemble generated file cmd := testenv.Command(t, testenv.GoToolPath(t), "tool", "asm", "-S", "-o", filepath.Join(dir, "test.o"), tmpfile) cmd.Env = append(os.Environ(), "GOOS=linux")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 02:46:11 UTC 2023 - 7.8K bytes - Viewed (0) -
testing/internal-integ-testing/src/main/groovy/org/gradle/test/fixtures/AbstractModule.groovy
def tmpFile = file.parentFile.file("${file.name}.tmp") if (content) { tmpFile.bytes = content } else if (isJarFile(file)) { writeZipped(tmpFile, cl) } else { writeContents(tmpFile, cl) // normalize line endings tmpFile.setText(TextUtil.normaliseLineSeparators(tmpFile.getText("utf-8")), "utf-8") }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Apr 04 07:21:38 UTC 2024 - 5K bytes - Viewed (0) -
internal/disk/stat_test.go
} for _, testCase := range testCases { testCase := testCase t.Run("", func(t *testing.T) { tmpfile, err := os.CreateTemp("", "testfile") if err != nil { t.Error(err) } tmpfile.WriteString(testCase.stat) tmpfile.Sync() tmpfile.Close() iostats, err := readDriveStats(tmpfile.Name()) if err != nil && !testCase.expectErr { t.Fatalf("unexpected err; %v", err) }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Feb 26 19:34:50 UTC 2024 - 3.6K bytes - Viewed (0) -
src/cmd/internal/obj/loong64/asm_test.go
buf := bytes.NewBuffer(make([]byte, 0, genBufSize)) genLargeBranch(buf) tmpfile := filepath.Join(dir, "x.s") if err := os.WriteFile(tmpfile, buf.Bytes(), 0644); err != nil { t.Fatalf("Failed to write file: %v", err) } // Assemble generated file. cmd := testenv.Command(t, testenv.GoToolPath(t), "tool", "asm", "-o", filepath.Join(dir, "x.o"), tmpfile) cmd.Env = append(os.Environ(), "GOARCH=loong64", "GOOS=linux")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 15 17:39:37 UTC 2024 - 2.2K bytes - Viewed (0) -
cmd/kubeadm/app/util/runtime/runtime_test.go
}{ { name: "Valid domain socket is detected as such", proc: func(t *testing.T) { tmpFile, err := os.CreateTemp("", tempPrefix) if err != nil { t.Fatalf("unexpected error by TempFile: %v", err) } theSocket := tmpFile.Name() os.Remove(theSocket) tmpFile.Close() con, err := net.Listen("unix", theSocket) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 30 06:33:22 UTC 2024 - 11.1K bytes - Viewed (0) -
test/fixedbugs/issue19658.go
{"string", `"test"`, "panic: test"}} { b := bytes.Buffer{} fmt.Fprintf(&b, fn, tc.Type, tc.Input) err = ioutil.WriteFile(tmpFile, b.Bytes(), 0644) if err != nil { log.Fatal(err) } cmd := exec.Command("go", "run", tmpFile) var buf bytes.Buffer cmd.Stdout = &buf cmd.Stderr = &buf cmd.Env = os.Environ() cmd.Run() // ignore err as we expect a panic
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 11 20:56:32 UTC 2023 - 2.3K bytes - Viewed (0)