- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 96 for tmpfiles (0.32 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) -
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/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) -
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) -
pkg/volume/util/fs/fs_windows_test.go
} defer os.RemoveAll(dir1) tmpfile1, err := os.CreateTemp(dir1, "test") if _, err = tmpfile1.WriteString("just for testing"); err != nil { t.Fatalf("TestDiskUsage failed: %s", err.Error()) } dir2, err := os.MkdirTemp(dir1, "dir_2") if err != nil { t.Fatalf("TestDiskUsage failed: %s", err.Error()) } tmpfile2, err := os.CreateTemp(dir2, "test") if _, err = tmpfile2.WriteString("just for testing"); err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 20 14:49:03 UTC 2023 - 4.1K 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/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) -
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)