Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for indexByAbsolutePath (0.24 sec)

  1. platforms/core-execution/execution/src/test/groovy/org/gradle/internal/execution/history/impl/FileSystemSnapshotSerializerTest.groovy

        }
    
        private static void assertEqualSnapshots(FileSystemSnapshot snapshot, FileSystemSnapshot expected) {
            assert snapshot == expected
            assert indexByAbsolutePath(snapshot) == indexByAbsolutePath(expected)
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:46:15 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  2. platforms/core-execution/snapshots/src/test/groovy/org/gradle/internal/vfs/impl/DefaultFileSystemAccessTest.groovy

            allowFileSystemAccess(true)
            def childSnapshot = read(childDir)
    
            when:
            def parentSnapshot = read(parentDir)
            def index = SnapshotUtil.indexByAbsolutePath(parentSnapshot)
    
            then:
            index[childDir.absolutePath].is(childSnapshot)
        }
    
        def "reuses cached descendant tree when it has siblings on read"() {
            given:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Nov 22 09:41:32 UTC 2023
    - 10K bytes
    - Viewed (0)
  3. platforms/core-execution/execution/src/main/java/org/gradle/internal/execution/history/impl/OutputSnapshotUtil.java

            Map<String, FileSystemLocationSnapshot> beforeExecutionIndex = indexByAbsolutePath(unfilteredBeforeExecution);
            if (beforeExecutionIndex.isEmpty()) {
                return unfilteredAfterExecution;
            }
    
            Map<String, FileSystemLocationSnapshot> previousIndex = previous != null
                ? indexByAbsolutePath(previous)
                : ImmutableMap.of();
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:46:15 UTC 2023
    - 11.9K bytes
    - Viewed (0)
  4. platforms/core-execution/snapshots/src/test/groovy/org/gradle/internal/snapshot/DirectorySnapshotTest.groovy

            ])
    
            when:
            def relocated = directorySnapshot.relocate(targetDir.absolutePath, stringInterner).get()
            def index = SnapshotUtil.indexByAbsolutePath(relocated)
    
            then:
            index.keySet() == [
                targetDir.absolutePath,
                targetDir.file("child").absolutePath,
                targetDir.file("child/child.txt").absolutePath,
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 23 13:19:32 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  5. platforms/core-execution/snapshots/src/main/java/org/gradle/internal/snapshot/SnapshotUtil.java

    import java.util.HashMap;
    import java.util.Map;
    import java.util.Optional;
    import java.util.function.Supplier;
    
    public class SnapshotUtil {
    
        public static Map<String, FileSystemLocationSnapshot> indexByAbsolutePath(FileSystemSnapshot snapshot) {
            HashMap<String, FileSystemLocationSnapshot> index = new HashMap<>();
            snapshot.accept(entrySnapshot -> {
                index.put(entrySnapshot.getAbsolutePath(), entrySnapshot);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 16:02:34 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  6. platforms/core-execution/execution/src/main/java/org/gradle/internal/execution/history/OutputsCleaner.java

        public void cleanupOutputs(FileSystemSnapshot snapshot) throws IOException {
            // TODO We could make this faster by visiting the snapshot
            for (Map.Entry<String, FileSystemLocationSnapshot> entry : SnapshotUtil.indexByAbsolutePath(snapshot).entrySet()) {
                cleanupOutput(new File(entry.getKey()), entry.getValue().getType());
            }
            cleanupDirectories();
        }
    
        /**
         * Cleans up a single location.
         *
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:46:15 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  7. subprojects/core/src/main/java/org/gradle/api/internal/tasks/execution/TaskExecution.java

            }
    
            @Override
            public FileCollectionInternal createDelegate() {
                List<File> outputs = previousOutputs.values().stream()
                    .map(SnapshotUtil::indexByAbsolutePath)
                    .map(Map::keySet)
                    .flatMap(Collection::stream)
                    .map(File::new)
                    .collect(Collectors.toList());
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Mar 08 13:46:07 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  8. platforms/core-execution/snapshots/src/test/groovy/org/gradle/internal/snapshot/impl/DirectorySnapshotterTest.groovy

            def snapshot = directorySnapshotter.snapshot(rootDir.absolutePath, null, knownSnapshots, unfilteredSubSnapshotsCollector)
    
            then:
            0 * _
    
            when:
            def visited = SnapshotUtil.indexByAbsolutePath(snapshot)
    
            then:
            visited[rootDir.absolutePath] instanceof DirectorySnapshot
            visited[rootTextFile.absolutePath] instanceof RegularFileSnapshot
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Nov 22 09:41:32 UTC 2023
    - 23.6K bytes
    - Viewed (0)
Back to top