- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 95 for temp_file (0.16 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/init_text_file_to_import_test_pass.cc
llvm::sys::fs::createTemporaryFile("text", "vocab", fd, filename); if (error_code) return signalPassFailure(); llvm::ToolOutputFile temp_file(filename, fd); temp_file.os() << "apple\n"; temp_file.os() << "banana\n"; temp_file.os() << "grape"; temp_file.os().flush(); // Replace filename constant ops to use the temporary file. MLIRContext* context = &getContext();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Oct 04 09:19:38 UTC 2022 - 5.5K bytes - Viewed (0) -
src/io/ioutil/tempfile.go
package ioutil import ( "os" ) // TempFile creates a new temporary file in the directory dir, // opens the file for reading and writing, and returns the resulting *[os.File]. // The filename is generated by taking pattern and adding a random // string to the end. If pattern includes a "*", the random string // replaces the last "*". // If dir is the empty string, TempFile uses the default directory
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 18 19:34:35 UTC 2023 - 1.7K bytes - Viewed (0) -
src/cmd/vendor/github.com/google/pprof/internal/driver/tempfile.go
// Give up return nil, fmt.Errorf("could not create file of the form %s%03d%s", prefix, 1, suffix) } var tempFiles []string var tempFilesMu = sync.Mutex{} // deferDeleteTempFile marks a file to be deleted by next call to Cleanup() func deferDeleteTempFile(path string) { tempFilesMu.Lock() tempFiles = append(tempFiles, path) tempFilesMu.Unlock() } // cleanupTempFiles removes any temporary files selected for deferred cleaning.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 22 23:33:06 UTC 2020 - 1.7K bytes - Viewed (0) -
platforms/core-runtime/file-temp/src/main/java/org/gradle/api/internal/file/temp/TempFiles.java
import javax.annotation.CheckReturnValue; import java.io.File; import java.io.IOException; /** * Security safe API's for creating temporary files. */ public final class TempFiles { private TempFiles() { /* no-op */ } /** * Improves the security guarantees of {@link File#createTempFile(String, String, File)}. * * @see File#createTempFile(String, String, File)
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:50:17 UTC 2023 - 1.6K bytes - Viewed (0) -
src/os/tempfile.go
_ "unsafe" // for go:linkname ) // random number source provided by runtime. // We generate random temporary file names so that there's a good // chance the file doesn't exist yet - keeps the number of tries in // TempFile to a minimum. // //go:linkname runtime_rand runtime.rand func runtime_rand() uint64 func nextRandom() string { return itoa.Uitoa(uint(uint32(runtime_rand()))) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 12 18:04:39 UTC 2024 - 3.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/cc/io_test.cc
auto* const env = tsl::Env::Default(); EXPECT_THAT(env->FileExists(*tmp_dir), IsOk()); ASSERT_THAT( WriteStringToFile(absl::StrCat(*tmp_dir, "/tmp_file1"), "test_string"), IsOk()); ASSERT_THAT( WriteStringToFile(absl::StrCat(*tmp_dir, "/tmp_file2"), "test_string"), IsOk()); ASSERT_THAT(env->RecursivelyCreateDir(absl::StrCat(*tmp_dir, "/subdir")), IsOk());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 03:28:15 UTC 2024 - 6.7K 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) -
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) -
pkg/kubelet/kubeletconfig/util/files/files.go
dir := filepath.Dir(path) prefix := tmpTag + filepath.Base(path) // create the tmp file tmpFile, err := fs.TempFile(dir, prefix) if err != nil { return "", err } defer func() { // close the file, return the close error only if there haven't been any other errors if err := tmpFile.Close(); retErr == nil { retErr = err }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 13 01:02:46 UTC 2023 - 7.5K bytes - Viewed (0)