Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for createLink (0.15 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/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)
  3. 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)
  4. 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)
  5. 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)
  6. testing/internal-testing/src/main/groovy/org/gradle/test/fixtures/file/TestWorkspaceBuilder.groovy

            dir(name).create(cl)
        }
    
        TestFile file(String name) {
            baseDir.file(name).createFile()
        }
    
        TestFile link(String name, String target) {
            baseDir.file(name).createLink(target)
        }
    
        def setMode(int mode) {
            baseDir.mode = mode
        }
    
        def methodMissing(String name, Object args) {
            if (args.length == 1 && args[0] instanceof Closure) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  7. subprojects/core/src/integTest/groovy/org/gradle/execution/commandline/CommandLineIntegrationTest.groovy

            def binary = new File("/usr/bin/$command")
            if (!binary.exists()) {
                binary = new File("/bin/$command")
            }
            assert binary.exists()
            binDir.file(command).createLink(binary)
        }
    
        def "can define gradle user home via environment variable"() {
            // the actual testing is done in the build script.
            when:
            buildFile """
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Apr 03 15:21:22 UTC 2024
    - 12K bytes
    - Viewed (0)
  8. platforms/jvm/jvm-services/src/test/groovy/org/gradle/jvm/toolchain/internal/LinuxInstallationSupplierTest.groovy

        def "supplies installations with symlinked candidate"() {
            given:
            def otherLocation = temporaryFolder.createDir("other")
            candidates.createDir("14-real")
            candidates.file("symlinked").createLink(otherLocation.canonicalFile)
    
            def supplier = new LinuxInstallationSupplier(OperatingSystem.LINUX, candidates)
    
            when:
            def directories = supplier.get()
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Apr 10 18:03:55 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. testing/performance/src/performanceTest/groovy/org/gradle/performance/regression/corefeature/ArchiveTreePerformanceTest.groovy

                void beforeBuild(BuildContext context) {
                    TestFile target = new TestFile(invocationSettings.projectDir, "archive-contents")
                    if (!target.exists()) {
                        target.createLink(source)
                    }
                }
            }
        }
    
        private static sampleFileContent = RandomStringUtils.random(1500)
    
        private static generateArchiveContents(File target) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 11:42:52 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  10. platforms/jvm/plugins-groovy/src/test/groovy/org/gradle/api/internal/plugins/GroovyJarFileTest.groovy

        }
    
        def "parse symlinked Jar"(String symlinkName, String fileName, String version, String dependencyNotation) {
            def actualFile = tmpDir.file(fileName).touch()
            def symlinkFile = tmpDir.file(symlinkName).createLink(actualFile)
    
            def jar = GroovyJarFile.parse(symlinkFile)
    
            expect:
            jar != null
            jar.file == actualFile
            jar.baseName == "groovy"
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 19 20:09:54 UTC 2024
    - 4.5K bytes
    - Viewed (0)
Back to top