Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 157 for writeTime (0.42 sec)

  1. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/OnDemandFileAccessTest.groovy

        }
    
        def "acquires exclusive lock to write file"() {
            def action = {} as Runnable
    
            when:
            lock.writeFile(action)
    
            then:
            !file.exists()
            1 * manager.lock(file, mode(LockMode.Exclusive), "some-lock") >> targetLock
            1 * targetLock.writeFile(action)
            1 * targetLock.close()
            0 * targetLock._
        }
    
        def "can read from file"() {
            given:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:50 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  2. platforms/core-runtime/serialization/src/main/java/org/gradle/internal/serialize/HierarchicalNameSerializer.java

                String parent = name.substring(0, separator);
                String child = name.substring(separator + 1);
                encoder.writeByte((byte) name.charAt(separator));
                writeName(parent, encoder);
                writeName(child, encoder);
            } else {
                encoder.writeByte((byte) 0);
                encoder.writeString(name);
            }
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 15 16:06:56 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/tls_test.go

    	certFile = path.Join(tempDir, "etcdcert.pem")
    	if err := ioutil.WriteFile(certFile, []byte(testingcert.CertFileContent), 0644); err != nil {
    		t.Fatal(err)
    	}
    	keyFile = path.Join(tempDir, "etcdkey.pem")
    	if err := ioutil.WriteFile(keyFile, []byte(testingcert.KeyFileContent), 0644); err != nil {
    		t.Fatal(err)
    	}
    	caFile = path.Join(tempDir, "ca.pem")
    	if err := ioutil.WriteFile(caFile, []byte(testingcert.CAFileContent), 0644); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 17:57:37 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  4. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/FileAccess.java

         * @throws IllegalStateException When this lock has been closed.
         * @throws FileIntegrityViolationException If the integrity of the file cannot be guaranteed (i.e. {@link #writeFile(Runnable)} has never been called)
         * @throws InsufficientLockModeException If the held lock is not at least a shared lock (e.g. LockMode.NONE)
         */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:50 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  5. platforms/core-configuration/core-serialization-codecs/src/main/kotlin/org/gradle/internal/serialize/codecs/core/ConfigurableFileTreeCodec.kt

    import org.gradle.internal.serialize.graph.readFile
    import org.gradle.internal.serialize.graph.writeFile
    
    
    class ConfigurableFileTreeCodec(
        private val fileCollectionFactory: FileCollectionFactory
    ) : Codec<ConfigurableFileTree> {
        override suspend fun WriteContext.encode(value: ConfigurableFileTree) {
            writeFile(value.dir)
            write(value.patterns)
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 23:09:56 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  6. src/cmd/cover/cfg_test.go

    import (
    	"cmd/internal/cov/covcmd"
    	"encoding/json"
    	"fmt"
    	"internal/testenv"
    	"os"
    	"path/filepath"
    	"strings"
    	"testing"
    )
    
    func writeFile(t *testing.T, path string, contents []byte) {
    	if err := os.WriteFile(path, contents, 0666); err != nil {
    		t.Fatalf("os.WriteFile(%s) failed: %v", path, err)
    	}
    }
    
    func writePkgConfig(t *testing.T, outdir, tag, ppath, pname string, gran string, mpath string) string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 12:51:11 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  7. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/OnDemandFileAccess.java

            } finally {
                lock.close();
            }
        }
    
        @Override
        public void writeFile(Runnable action) throws LockTimeoutException {
            FileLock lock = manager.lock(targetFile, mode(FileLockManager.LockMode.Exclusive), displayName);
            try {
                lock.writeFile(action);
            } finally {
                lock.close();
            }
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:50 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  8. src/syscall/getdirentries_test.go

    	for i := 0; i < count; i++ {
    		names = append(names, fmt.Sprintf("file%03d", i))
    	}
    
    	// Make files in the temp directory
    	for _, name := range names {
    		err := os.WriteFile(filepath.Join(d, name), []byte("data"), 0)
    		if err != nil {
    			t.Fatalf("WriteFile: %v", err)
    		}
    	}
    
    	// Read files using Getdirentries
    	var names2 []string
    	fd, err := syscall.Open(d, syscall.O_RDONLY, 0)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  9. cmd/kube-scheduler/app/options/configfile_test.go

    	correctConfigFile := filepath.Join(tmpDir, "correct_config.yaml")
    	if err := os.WriteFile(correctConfigFile,
    		[]byte(schedulerConfigMinimalCorrect),
    		os.FileMode(0600)); err != nil {
    		t.Fatal(err)
    	}
    
    	decodeErrConfigFile := filepath.Join(tmpDir, "decode_err_no_version_config.yaml")
    	if err := os.WriteFile(decodeErrConfigFile,
    		[]byte(schedulerConfigDecodeErr),
    		os.FileMode(0600)); err != nil {
    		t.Fatal(err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 22 13:43:42 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  10. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/FixedSharedModeCrossProcessCacheAccessTest.groovy

            then:
            1 * lockManager.lock(file, {it.mode == FileLockManager.LockMode.Exclusive }, "<cache>") >> exclusiveLock
            1 * initAction.requiresInitialization(exclusiveLock) >> true
            1 * exclusiveLock.writeFile(_) >> { Runnable r -> r.run() }
            1 * initAction.initialize(exclusiveLock)
            1 * exclusiveLock.close()
    
            then:
            1 * lockManager.lock(file, lockOptions, "<cache>") >> sharedLock
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:51 UTC 2024
    - 5.5K bytes
    - Viewed (0)
Back to top