Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for readRegularFileContentHash (0.29 sec)

  1. subprojects/core/src/test/groovy/org/gradle/cache/internal/DefaultFileContentCacheFactoryTest.groovy

            when:
            def result = cache.get(file)
    
            then:
            result == 12
    
            and:
            1 * fileSystemAccess.readRegularFileContentHash(file.absolutePath) >> Optional.empty()
            1 * calculator.calculate(file, false) >> 12
            0 * _
    
            when:
            result = cache.get(file)
    
            then:
            result == 12
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Mar 12 02:21:10 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  2. platforms/core-execution/snapshots/src/main/java/org/gradle/internal/vfs/FileSystemAccess.java

        /**
         * Visits the hash of the content of the file only if the file is a regular file.
         *
         * @return the visitor function applied to the found snapshot.
         */
        Optional<HashCode> readRegularFileContentHash(String location);
    
        /**
         * Reads the hierarchy of files at the given location.
         */
        FileSystemLocationSnapshot read(String location);
    
        /**
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Mar 15 08:29:37 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  3. subprojects/core/src/main/java/org/gradle/cache/internal/DefaultFileContentCacheFactory.java

                locationCache.clear();
            }
    
            @Override
            public V get(File file) {
                return locationCache.computeIfAbsent(file,
                    location -> fileSystemAccess.readRegularFileContentHash(location.getAbsolutePath())
                        .map(contentHash -> contentCache.get(contentHash, key -> calculator.calculate(location, true))
                    ).orElseGet(
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Jan 10 15:51:31 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  4. platforms/core-execution/snapshots/src/main/java/org/gradle/internal/vfs/impl/DefaultFileSystemAccess.java

                location,
                Function.identity(),
                () -> snapshot(location, SnapshottingFilter.EMPTY)
            );
        }
    
        @Override
        public Optional<HashCode> readRegularFileContentHash(String location) {
            return virtualFileSystem.findMetadata(location)
                .<Optional<FileSystemLocationSnapshot>>flatMap(snapshot -> {
                    if (snapshot.getType() != FileType.RegularFile) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 16:02:35 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  5. platforms/native/language-native/src/main/java/org/gradle/language/nativeplatform/internal/incremental/IncrementalCompileFilesFactory.java

            /**
             * @return true if this source file requires recompilation, false otherwise.
             */
            private boolean visitSourceFile(File sourceFile) {
                return fileSystemAccess.readRegularFileContentHash(sourceFile.getAbsolutePath())
                    .map(fileContent -> {
                        SourceFileState previousState = previous.getState(sourceFile);
    
                        if (previousState != null) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 16 20:20:03 UTC 2023
    - 14.6K bytes
    - Viewed (0)
  6. platforms/native/language-native/src/test/groovy/org/gradle/language/nativeplatform/internal/incremental/IncrementalCompileProcessorTest.groovy

                    }
                }
            }
        }
    
        private HashCode getContentHash(File file) {
            fileSystemAccess.invalidate([file.absolutePath])
            return fileSystemAccess.readRegularFileContentHash(file.getAbsolutePath())
                .orElse(new MissingFileSnapshot(file.getAbsolutePath(), file.getName(), AccessType.DIRECT).hash)
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Mar 08 15:31:28 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  7. platforms/native/language-native/src/main/java/org/gradle/language/nativeplatform/internal/incremental/DefaultSourceIncludesResolver.java

                return contents.computeIfAbsent(includePath,
                    key -> {
                        File candidate = normalizeIncludePath(searchDir, includePath);
                        return fileSystemAccess.readRegularFileContentHash(candidate.getAbsolutePath())
                            .map(contentHash -> (CachedIncludeFile) new SystemIncludeFile(candidate, key, contentHash))
                            .orElse(MISSING_INCLUDE_FILE);
                    });
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 16 20:20:03 UTC 2023
    - 24.4K bytes
    - Viewed (0)
Back to top