- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 167 for tmpfiles (0.28 sec)
-
src/cmd/internal/obj/x86/pcrelative_test.go
if err != nil { t.Fatal(err) } tmpfile, err := os.Create(filepath.Join(tmpdir, "input.s")) if err != nil { t.Fatal(err) } defer tmpfile.Close() _, err = tmpfile.WriteString(source) if err != nil { t.Fatal(err) } tmpfile2, err := os.Create(filepath.Join(tmpdir, "input.go")) if err != nil { t.Fatal(err) } defer tmpfile2.Close() _, err = tmpfile2.WriteString(goData) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 15 23:16:01 UTC 2024 - 2.3K bytes - Viewed (0) -
src/io/ioutil/example_test.go
tmpfile, err := ioutil.TempFile("", "example.*.txt") if err != nil { log.Fatal(err) } defer os.Remove(tmpfile.Name()) // clean up if _, err := tmpfile.Write(content); err != nil { tmpfile.Close() log.Fatal(err) } if err := tmpfile.Close(); err != nil { log.Fatal(err) } } func ExampleReadFile() { content, err := ioutil.ReadFile("testdata/hello")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 22 23:03:58 UTC 2021 - 2.7K bytes - Viewed (0) -
src/io/ioutil/tempfile_test.go
{sep + "ioutil_test" + sep + "*foo", true}, {"ioutil_test*foo" + sep, true}, } for _, tt := range tests { t.Run(tt.pattern, func(t *testing.T) { tmpfile, err := TempFile(tmpDir, tt.pattern) defer func() { if tmpfile != nil { tmpfile.Close() } }() if tt.wantErr { if err == nil { t.Errorf("Expected an error for pattern %q", tt.pattern)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 18 00:47:29 UTC 2022 - 5.5K 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) -
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) -
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) -
pkg/kubelet/kubeletconfig/util/files/files.go
// an absolute path to os.Open, and we ensure similar behavior in utilfs.FakeFS for testing. tmpPath = tmpFile.Name() // write data if _, err := tmpFile.Write(data); err != nil { return tmpPath, err } // sync file, to ensure it's written in case a hard reset happens return tmpPath, tmpFile.Sync() } // ReplaceFile replaces the contents of the file at `path` with `data` by writing to a tmp file in the same
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 13 01:02:46 UTC 2023 - 7.5K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/client/ftp/FtpClient.java
} if (includeContent) { File tempFile = null; File outputFile = null; try { tempFile = File.createTempFile("ftp-", ".tmp"); try (OutputStream out = new BufferedOutputStream(new FileOutputStream(tempFile))) { if (!client.retrieveFile(ftpInfo.getName(), out)) {
Registered: Wed Jun 12 15:17:51 UTC 2024 - Last Modified: Thu Feb 22 01:36:27 UTC 2024 - 25.7K bytes - Viewed (0) -
cmd/common-main_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.content) tmpfile.Sync() tmpfile.Close() value, err := readFromSecret(tmpfile.Name()) if err != nil && !testCase.expectedErr { t.Error(err) }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 3.7K bytes - Viewed (0) -
pkg/file/file.go
} } } }() if err := os.Chmod(tmpFile.Name(), mode); err != nil { return err } if _, err := io.Copy(tmpFile, data); err != nil { if closeErr := tmpFile.Close(); closeErr != nil { err = fmt.Errorf("%s: %w", closeErr.Error(), err) } return err } if err := tmpFile.Close(); err != nil { return err } return os.Rename(tmpFile.Name(), path) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Apr 11 21:42:29 UTC 2024 - 3K bytes - Viewed (0)