Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for withContentIfPresent (0.29 sec)

  1. platforms/software/resources/src/main/java/org/gradle/internal/resource/local/DefaultLocallyAvailableExternalResource.java

            return localFile.withContent(readAction);
        }
    
        @Override
        @Nullable
        public <T> ExternalResourceReadResult<T> withContentIfPresent(ContentAction<? extends T> readAction) throws ResourceException {
            return localFile.withContentIfPresent(readAction);
        }
    
        @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  2. platforms/software/resources/src/main/java/org/gradle/internal/resource/AbstractExternalResource.java

            ExternalResourceReadResult<T> result = withContentIfPresent(readAction);
            if (result == null) {
                throw ResourceExceptions.getMissing(getURI());
            }
            return result;
        }
    
        @Override
        public <T> ExternalResourceReadResult<T> withContent(ContentAndMetadataAction<? extends T> readAction) {
            ExternalResourceReadResult<T> result = withContentIfPresent(readAction);
            if (result == null) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  3. platforms/software/resources/src/main/java/org/gradle/internal/resource/transfer/AccessorBackedExternalResource.java

            throw new UnsupportedOperationException();
        }
    
        @Nullable
        @Override
        public <T> ExternalResourceReadResult<T> withContentIfPresent(ContentAction<? extends T> readAction) throws ResourceException {
            return accessor.withContent(name, revalidate, inputStream -> {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  4. platforms/software/resources/src/main/java/org/gradle/internal/resource/ExternalResource.java

         *
         * @return null if the resource does not exist.
         * @throws ResourceException on failure to read the content.
         */
        @Nullable
        <T> ExternalResourceReadResult<T> withContentIfPresent(ContentAction<? extends T> readAction) throws ResourceException;
    
        /**
         * Executes the given action against the binary contents and meta-data of this resource.
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  5. platforms/software/resources/src/test/groovy/org/gradle/internal/resource/transfer/UrlExternalResourceTest.groovy

        def "can read file"() {
            def file = tmpDir.createFile("content")
            file.text = "1234"
    
            expect:
            def resource = UrlExternalResource.open(file.toURI().toURL())
            resource.withContentIfPresent(new ExternalResource.ContentAndMetadataAction() {
                @Override
                String execute(InputStream inputStream, ExternalResourceMetaData metaData) throws IOException {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  6. platforms/software/resources/src/main/java/org/gradle/internal/resource/local/LocalFileStandInExternalResource.java

            } catch (IOException e) {
                throw ResourceExceptions.getFailed(getURI(), e);
            }
        }
    
        @Nullable
        @Override
        public <T> ExternalResourceReadResult<T> withContentIfPresent(ContentAndMetadataAction<? extends T> readAction) throws ResourceException {
            if (!localFile.exists()) {
                return null;
            }
            try {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  7. platforms/core-configuration/configuration-cache/src/main/kotlin/org/gradle/internal/cc/impl/services/RemoteScriptUpToDateChecker.kt

                    val downloadAction = DownloadAction(externalResourceName, temporaryFileProvider, null)
                    externalResource.withContentIfPresent(downloadAction)
    
                    lockingAccessCoordinator.useCache {
                        val cachedResource = externalResourceFileStore.move(externalResource.toString(), downloadAction.destination)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  8. platforms/software/security/src/main/java/org/gradle/security/internal/PublicKeyDownloadService.java

                    try {
                        ExternalResourceName query = toQuery(baseUri, fingerprint);
                        ExternalResourceReadResult<ExponentialBackoff.Result<Boolean>> response = client.resource(query).withContentIfPresent(inputStream -> {
                            extractKeyRing(inputStream, builder, onKeyring);
                            return ExponentialBackoff.Result.successful(true);
                        });
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 12 08:49:35 UTC 2024
    - 6.9K bytes
    - Viewed (0)
Back to top