Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 560 for writefile (0.59 sec)

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

            lock.updateFile {}
    
            then:
            thrown FileIntegrityViolationException
        }
    
        def "writeFile does not throw integrity exception when not cleanly unlocked file"() {
            given:
            unlockUncleanly()
    
            when:
            createLock(Exclusive).writeFile {}
    
            then:
            notThrown FileIntegrityViolationException
        }
    
        def "can lock a file"() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:51 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  2. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/MultiProcessSafeIndexedCacheTest.groovy

            then:
            1 * fileAccess.writeFile(!null) >> { Runnable action -> action.run() }
            1 * backingCache.put("key", "value")
            0 * _._
        }
    
        def "holds write lock while removing entry from cache"() {
            given:
            cacheOpened()
    
            when:
            cache.remove("key")
    
            then:
            1 * fileAccess.writeFile(!null) >> { Runnable action -> action.run() }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:50 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  3. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/DefaultMultiProcessSafeIndexedCache.java

            // Use writeFile because the cache can internally recover from datafile
            // corruption, so we don't care at this level if it's corrupt
            fileAccess.writeFile(() -> cache.put(key, value));
        }
    
        @Override
        public void remove(final K key) {
            final BTreePersistentIndexedCache<K, V> cache = getCache();
            // Use writeFile because the cache can internally recover from datafile
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:50 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  4. testing/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/resolve/GenerateGraphTask.groovy

                if (buildArtifacts) {
                    files.each {
                        writeFile("file-file", writer, it)
                    }
                    files.filter { true }.each {
                        writeFile("file-filtered", writer, it)
                    }
    
                    incomingFiles.each {
                        writeFile("incoming-file", writer, it)
                    }
                    incomingArtifacts.each {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  5. test/linkobj.go

    		os.RemoveAll(dir)
    		log.Fatal(err)
    	}
    	tmpdir = dir
    
    	writeFile("p1.go", `
    		package p1
    
    		func F() {
    			println("hello from p1")
    		}
    	`)
    	writeFile("p2.go", `
    		package p2
    
    		import "./p1"
    
    		func F() {
    			p1.F()
    			println("hello from p2")
    		}
    
    		func main() {}
    	`)
    	writeFile("p3.go", `
    		package main
    
    		import "./p2"
    
    		func main() {
    			p2.F()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  6. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/DefaultFileLockManagerWithNewProtocolTest.groovy

            given:
            def lockManager = new DefaultFileLockManager(metaDataProvider, contentionHandler)
            writeFile(lockManager)
    
            and:
            def lock = createLock(lockMode)
            def beforeUpdate = lock.state
            lock.close()
    
            and:
            writeFile(lockManager)
            writeFile(lockManager)
    
            when:
            lock = createLock(lockMode)
            def afterUpdate = lock.state
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Jan 10 15:52:52 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  7. platforms/core-configuration/configuration-cache/src/main/kotlin/org/gradle/internal/cc/impl/serialize/ClassPathEncodingExtensions.kt

    fun Encoder.writeDefaultClassPath(classPath: ClassPath) {
        writeCollection(classPath.asFiles) {
            writeFile(it)
        }
    }
    
    
    internal
    fun Encoder.writeTransformedClassPath(classPath: TransformedClassPath) {
        writeCollection(classPath.asFiles.zip(classPath.asTransformedFiles)) {
            writeFile(it.first)
            writeFile(it.second)
        }
    }
    
    
    internal
    fun Decoder.readClassPath(): ClassPath {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:30 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  8. src/io/ioutil/ioutil.go

    	return os.ReadFile(filename)
    }
    
    // WriteFile writes data to a file named by filename.
    // If the file does not exist, WriteFile creates it with permissions perm
    // (before umask); otherwise WriteFile truncates it before writing, without changing permissions.
    //
    // Deprecated: As of Go 1.16, this function simply calls [os.WriteFile].
    func WriteFile(filename string, data []byte, perm fs.FileMode) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  9. src/io/ioutil/ioutil_test.go

    	}
    	defer os.RemoveAll(tempDir)
    	filename := filepath.Join(tempDir, "blurp.txt")
    
    	shmorp := []byte("shmorp")
    	florp := []byte("florp")
    	err = WriteFile(filename, shmorp, 0444)
    	if err != nil {
    		t.Fatalf("WriteFile %s: %v", filename, err)
    	}
    	err = WriteFile(filename, florp, 0444)
    	if err == nil {
    		t.Fatalf("Expected an error when writing to read-only file %s", filename)
    	}
    	got, err := ReadFile(filename)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 11 20:56:32 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  10. platforms/documentation/docs/src/snippets/testKit/junitQuickstart/groovy/src/test/java/org/gradle/sample/BuildLogicFunctionalTest.java

            writeFile(settingsFile, "rootProject.name = 'hello-world'");
            String buildFileContent = "task helloWorld {" +
                                      "    doLast {" +
                                      "        println 'Hello world!'" +
                                      "    }" +
                                      "}";
            writeFile(buildFile, buildFileContent);
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 2K bytes
    - Viewed (0)
Back to top