Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for indexByAbsolutePath (0.2 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/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)
  3. 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)
  4. 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)
Back to top