- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for writefile (0.21 sec)
-
src/os/os_test.go
defer chtmpdir(t)() const f = "append.txt" s := writeFile(t, f, O_CREATE|O_TRUNC|O_RDWR, "new") if s != "new" { t.Fatalf("writeFile: have %q want %q", s, "new") } s = writeFile(t, f, O_APPEND|O_RDWR, "|append") if s != "new|append" { t.Fatalf("writeFile: have %q want %q", s, "new|append") } s = writeFile(t, f, O_CREATE|O_APPEND|O_RDWR, "|append") if s != "new|append|append" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 83.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt
writeFile(getCleanFile("g2", 0), "C") writeFile(getCleanFile("g2", 1), "D") writeFile(getCleanFile("g2", 1), "D") writeFile(cacheDir / "otherFile0", "E") writeFile(dir2 / "otherFile1", "F") } private fun assertGarbageFilesAllDeleted() { assertThat(filesystem.exists(getCleanFile("g1", 0))).isFalse() assertThat(filesystem.exists(getCleanFile("g1", 1))).isFalse()
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Apr 15 14:55:09 UTC 2024 - 75.8K bytes - Viewed (0) -
src/cmd/dist/build.go
os.Setenv("LANG", "C") os.Setenv("LANGUAGE", "en_US.UTF8") os.Unsetenv("GO111MODULE") os.Setenv("GOENV", "off") os.Unsetenv("GOFLAGS") os.Setenv("GOWORK", "off") workdir = xworkdir() if err := os.WriteFile(pathf("%s/go.mod", workdir), []byte("module bootstrap"), 0666); err != nil { fatalf("cannot write stub go.mod: %s", err) } xatexit(rmworkdir) tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 18:34:40 UTC 2024 - 54K bytes - Viewed (0) -
src/cmd/link/internal/ld/lib.go
{ .debug_gdb_scripts BLOCK(__section_alignment__) (NOLOAD) : { *(.debug_gdb_scripts) } } INSERT AFTER .debug_types; ` err := os.WriteFile(path, []byte(src), 0666) if err != nil { Errorf(nil, "WriteFile %s failed: %v", name, err) } return path } type machoUpdateFunc func(ctxt *Link, exef *os.File, exem *macho.File, outexe string) error
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 18:45:27 UTC 2024 - 88.6K bytes - Viewed (0) -
src/net/http/fs_test.go
func testFileServerImplicitLeadingSlash(t *testing.T, mode testMode) { tempDir := t.TempDir() if err := os.WriteFile(filepath.Join(tempDir, "foo.txt"), []byte("Hello world"), 0644); err != nil { t.Fatalf("WriteFile: %v", err) } ts := newClientServerTest(t, mode, StripPrefix("/bar/", FileServer(Dir(tempDir)))).ts get := func(suffix string) string {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 23:39:44 UTC 2024 - 49.9K bytes - Viewed (0) -
cmd/erasure-healing_test.go
uuid, _ := uuid2.NewRandom() for _, drive := range fsDirs { dir := path.Join(drive, bucket, object, uuid.String()) err = os.MkdirAll(dir, os.ModePerm) if err != nil { t.Fatal(err) } err = os.WriteFile(pathJoin(dir, "part.1"), []byte("some data"), os.ModePerm) if err != nil { t.Fatal(err) } } // This should remove all the unreferenced parts.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 15:51:27 UTC 2024 - 49K bytes - Viewed (0) -
src/cmd/go/go_test.go
if err != nil { t.Fatal(err) } old := data data = append(data, fmt.Sprintf("var DummyUnusedVar%d bool\n", idx)...) if err := os.WriteFile(name, append(data, '\n'), 0666); err != nil { t.Fatal(err) } tg.sleep() return func() { if err := os.WriteFile(name, old, 0666); err != nil { t.Fatal(err) } } } // Every main package depends on the "runtime".
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 81.1K bytes - Viewed (0) -
pkg/volume/csi/csi_attacher_test.go
} } dir := filepath.Dir(tc.deviceMountPath) // Make JSON for this object if tc.jsonFile != "" { dataPath := filepath.Join(dir, volDataFileName) if err := os.WriteFile(dataPath, []byte(tc.jsonFile), 0644); err != nil { t.Fatalf("error creating %s: %s", dataPath, err) } } if tc.createPV { // Make the PV for this object pvName := filepath.Base(dir)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 18 12:23:16 UTC 2024 - 58.1K bytes - Viewed (0) -
src/net/dnsclient_unix_test.go
} if !conf.forceUpdateConf(&resolvConf, time.Now().Add(time.Hour)) { t.Fatal("failed to update resolv config") } tmpFile := filepath.Join(t.TempDir(), "hosts") if err := os.WriteFile(tmpFile, []byte{}, 0660); err != nil { t.Fatal(err) } hostsFilePath = tmpFile const testName = "test.invalid" order, _ := systemConf().hostLookupOrder(DefaultResolver, testName)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Apr 14 18:23:45 UTC 2024 - 72.4K bytes - Viewed (0) -
src/cmd/go/internal/modload/init.go
// WriteWorkFile cleans and writes out the go.work file to the given path. func WriteWorkFile(path string, wf *modfile.WorkFile) error { wf.SortBlocks() wf.Cleanup() out := modfile.Format(wf.Syntax) return os.WriteFile(path, out, 0666) } // UpdateWorkGoVersion updates the go line in wf to be at least goVers, // reporting whether it changed the file. func UpdateWorkGoVersion(wf *modfile.WorkFile, goVers string) (changed bool) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 18:36:30 UTC 2024 - 69.8K bytes - Viewed (0)