Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 449 for writeTime (0.13 sec)

  1. src/cmd/go/testdata/script/generate_workspace.txt

    go 1.22
    
    use ./mod
    -- mod/go.mod --
    module example.com/mod
    -- mod/gen.go --
    //go:generate go run gen.go got.txt
    
    package main
    
    import "os"
    
    func main() {
        outfile := os.Args[1]
        os.WriteFile(outfile, []byte("Hello World!\n"), 0644)
    }
    -- want.txt --
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 29 19:39:24 UTC 2024
    - 437 bytes
    - Viewed (0)
  2. src/net/http/filetransport_test.go

    		}
    		t.Fatalf("%s: %v", call, err)
    	}
    }
    
    func TestFileTransport(t *testing.T) {
    	check := checker(t)
    
    	dname := t.TempDir()
    	fname := filepath.Join(dname, "foo.txt")
    	err := os.WriteFile(fname, []byte("Bar"), 0644)
    	check("WriteFile", err)
    	defer os.Remove(fname)
    
    	tr := &Transport{}
    	tr.RegisterProtocol("file", NewFileTransport(Dir(dname)))
    	c := &Client{Transport: tr}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 17:07:12 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  3. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/FileBackedObjectHolderTest.groovy

            cache.set('some value')
    
            then:
            1 * fileAccess.writeFile(!null) >> { it[0].run() }
            1 * chmod.chmod(file.parentFile, 0700)
            1 * chmod.chmod(file, 0600)
        }
    
        def "update provides access to cached value"() {
            when:
            cache.set("foo")
    
            then:
            1 * fileAccess.writeFile(!null) >> { it[0].run() }
    
            when:
            cache.update({ value ->
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:50 UTC 2024
    - 5K bytes
    - Viewed (0)
  4. pkg/kubelet/util/store/filestore.go

    }
    
    // getPathByKey returns the full path of the file for the key.
    func (f *FileStore) getPathByKey(key string) string {
    	return filepath.Join(f.directoryPath, key)
    }
    
    // writeFile writes data to path in a single transaction.
    func writeFile(fs utilfs.Filesystem, path string, data []byte) (retErr error) {
    	// Create a temporary file in the base directory of `path` with a prefix.
    	tmpFile, err := fs.TempFile(filepath.Dir(path), tmpPrefix)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 18 15:08:27 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  5. src/internal/types/errors/generrordocs.go

    		err := template.Must(template.New("eachError").Parse(markdownTemplate)).Execute(&buf, e)
    		if err != nil {
    			log.Fatalf("template.Must: %s", err)
    		}
    		if err := os.WriteFile(path.Join(outDir, name+".md"), buf.Bytes(), 0660); err != nil {
    			log.Fatalf("os.WriteFile: %s\n", err)
    		}
    	})
    	log.Printf("output directory: %s\n", outDir)
    }
    
    func walkCodes(f func(string, *ast.ValueSpec)) {
    	fset := token.NewFileSet()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 03:14:42 UTC 2023
    - 3K bytes
    - Viewed (0)
  6. operator/cmd/mesh/operator_test.go

    	gotYAML, err := runCommand(cmd)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	if refreshGoldenFiles() {
    		t.Logf("Refreshing golden file for %s", goldenFilepath)
    		if err := os.WriteFile(goldenFilepath, []byte(gotYAML), 0o644); err != nil {
    			t.Error(err)
    		}
    	}
    
    	wantYAML, err := readFile(goldenFilepath)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 29 14:15:33 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  7. pkg/volume/util/subpath/subpath_linux_test.go

    			true,
    		},
    		{
    			"non-directory",
    			func(base string) error {
    				return ioutil.WriteFile(filepath.Join(base, "test"), []byte{}, defaultPerm)
    			},
    			"test/directory",
    			"",
    			defaultPerm,
    			true,
    		},
    		{
    			"non-directory-final",
    			func(base string) error {
    				return ioutil.WriteFile(filepath.Join(base, "test"), []byte{}, defaultPerm)
    			},
    			"test",
    			"",
    			defaultPerm,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 10 16:52:55 UTC 2021
    - 37.3K bytes
    - Viewed (0)
  8. src/cmd/pack/pack_test.go

    	testenv.MustHaveGoBuild(t)
    
    	dir := t.TempDir()
    
    	const aSrc = `package a; const X = "\n!\n"`
    	err := os.WriteFile(filepath.Join(dir, "a.go"), []byte(aSrc), 0666)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	const bSrc = `package b; import _ "a"`
    	err = os.WriteFile(filepath.Join(dir, "b.go"), []byte(bSrc), 0666)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	run := func(args ...string) string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 04 16:27:35 UTC 2023
    - 12.5K bytes
    - Viewed (0)
  9. operator/cmd/mesh/profile-dump_test.go

    			got = installPackagePathRegex.ReplaceAllString(got, "")
    
    			if refreshGoldenFiles() {
    				t.Logf("Refreshing golden file for %s", outPath)
    				if err := os.WriteFile(outPath, []byte(got), 0o644); err != nil {
    					t.Error(err)
    				}
    			}
    
    			want, err := readFile(outPath)
    			if err != nil {
    				t.Fatal(err)
    			}
    			if !util.IsYAMLEqual(got, want) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jan 20 11:44:25 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  10. src/cmd/distpack/pack.go

    			if err != nil {
    				log.Fatalf("VERSION: bad time: %s", err)
    			}
    		}
    	}
    	return version, t
    }
    
    // writeFile writes a file with the given name and data or fatals.
    func writeFile(name string, data []byte) {
    	if err := os.WriteFile(name, data, 0666); err != nil {
    		log.Fatal(err)
    	}
    	reportHash(name)
    }
    
    // check panics if err is not nil. Otherwise it returns x.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 10.9K bytes
    - Viewed (0)
Back to top