Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for createLink (0.31 sec)

  1. platforms/core-runtime/files/src/testFixtures/groovy/org/gradle/internal/file/AbstractFileMetadataAccessorTest.groovy

        def "stats a symlink cycle"() {
            def first = tmpDir.file("first")
            def second = tmpDir.file("second")
            def third = tmpDir.file("third")
            first.createLink(second)
            second.createLink(third)
            third.createLink(first)
    
            expect:
            def stat = accessor.stat(first)
            stat.type == FileType.Missing
            stat.lastModified == 0
            stat.length == 0
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:50:56 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  2. platforms/core-execution/snapshots/src/test/groovy/org/gradle/internal/snapshot/impl/DirectorySnapshotterTest.groovy

            def linkTarget3 = tmpDir.createFile("linkTarget3")
    
            rootDir.createLink(linkTarget1)
            linkTarget1.file("includedSymlink").createLink(linkTarget2)
            linkTarget1.file("excludedSymlink").createLink(linkTarget2)
            linkTarget2.file("symlinkedFile.txt").createLink(linkTarget3)
            linkTarget2.file("excludedSymlinkedFile.png").createLink(linkTarget3)
    
            // rootDir -> linkTarget1
            //   - included
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Nov 22 09:41:32 UTC 2023
    - 23.6K bytes
    - Viewed (0)
  3. platforms/jvm/jvm-services/src/test/groovy/org/gradle/jvm/toolchain/internal/SdkmanInstallationSupplierTest.groovy

        def "supplies installations with symlinked candidate"() {
            given:
            def real = candidates.createDir("java/11.0.6.hs-adpt")
            def symlink = candidates.file("java/symlink").createLink(real)
    
            when:
            def directories = supplier.get()
    
            then:
            directories.size() == 2
            directories*.location.containsAll(real, symlink)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 18 22:17:53 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  4. subprojects/core/src/integTest/groovy/org/gradle/api/file/FileCollectionSymlinkIntegrationTest.groovy

            def baseDir = file('build')
            baseDir.file('file').text = 'some contents'
            def symlinked = baseDir.file('symlinked')
            symlinked.text = 'target of symlink'
            baseDir.file('symlink').createLink(symlinked)
    
            buildScript << """
                def baseDir = new File("${escapeString(baseDir)}")
                def file = new File(baseDir, "file")
                def symlink = new File(baseDir, "symlink")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 28 09:03:53 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  5. subprojects/core/src/integTest/groovy/org/gradle/api/tasks/IncrementalBuildSymlinkHandlingIntegrationTest.groovy

    }
    """
        }
    
        def "uses the target of symlink for input file content"() {
            file("in-dir").createDir()
            def inFile = file("other").createFile()
            def link = file("in.txt")
            link.createLink("other")
    
            given:
            run("work")
            run("work")
            result.assertTasksSkipped(":work")
    
            when:
            inFile.text = 'new content'
            run("work")
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Feb 01 14:30:36 UTC 2024
    - 8K bytes
    - Viewed (0)
  6. platforms/core-execution/file-watching/src/integTest/groovy/org/gradle/internal/watch/SymlinkFileSystemWatchingIntegrationTest.groovy

        def "gracefully handle when declaring the same path as an input via symlinks"() {
            def actualDir = file("actualDir").createDir()
            file("symlink1").createLink(actualDir)
            file("symlink2").createLink(actualDir)
    
            buildFile << """
                task myTask {
                    def outputFile = file("build/output.txt")
                    inputs.dir("symlink1")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Apr 03 13:50:33 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  7. platforms/jvm/jvm-services/src/test/groovy/org/gradle/jvm/toolchain/internal/AsdfInstallationSupplierTest.groovy

        def "supplies installations with symlinked candidate"() {
            given:
            def real = candidates.createDir("installs/java/11.0.6.hs-adpt")
            def symlink = candidates.file("installs/java/symlink").createLink(real)
    
            when:
            def directories = supplier.get()
    
            then:
            directories.size() == 2
            directories*.location.containsAll(real, symlink)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 18 22:17:53 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  8. platforms/core-execution/snapshots/src/test/groovy/org/gradle/internal/fingerprint/impl/BrokenSymlinkNormalizationStrategyTest.groovy

        def fileSystemAccess = TestFiles.fileSystemAccess()
    
        def "root broken symlink is ignored for #strategyName"() {
            given:
            def root = file('root')
            root.createLink(file('non-existing'))
    
            when:
            def fingerprints = strategy.collectFingerprints(snapshot(root))
    
            then:
            fingerprints.isEmpty()
    
            where:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:34:50 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  9. platforms/core-configuration/file-collections/src/testFixtures/groovy/org/gradle/api/internal/file/collections/AbstractDirectoryWalkerTest.groovy

            def rootDir = tmpDir.createDir("root")
            def dir = rootDir.createDir("a/b")
            def file = dir.file("c.txt").createFile()
            file << "Hello world"
            def link = rootDir.file("a/d")
            link.createLink(dir)
    
            when:
            def visited = walkDirForPaths(walkerInstance, rootDir, new PatternSet())
    
            then:
            visited.contains(file.absolutePath)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 7K bytes
    - Viewed (0)
  10. platforms/jvm/jvm-services/src/test/groovy/org/gradle/internal/jvm/inspection/CachingJvmMetadataDetectorTest.groovy

            def link = new TestFile(Files.createTempDirectory(temporaryFolder.toPath(), null).toFile(), "jdklink")
            link.createLink(javaHome1)
    
            when:
            def metadata1 = detector.getMetadata(testLocation(link.absolutePath))
            link.createLink(new File("doesntExist"))
            def metadata2 = detector.getMetadata(testLocation(link.absolutePath))
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Mar 12 18:25:34 UTC 2024
    - 4.2K bytes
    - Viewed (0)
Back to top