Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for untarTo (0.17 sec)

  1. subprojects/core/src/integTest/groovy/org/gradle/api/tasks/ArchiveTaskPermissionsIntegrationTest.groovy

            then:
            file("build/child").mode == 0777
            file("build/child/reference.txt").mode == 0746
            where:
            taskName | unpackMethod
            "Zip"    | "unzipTo"
            "Tar"    | "untarTo"
        }
    
        @Requires(UnitTestPreconditions.FilePermissions)
        def "file and directory permissions can be overridden in #taskName task"() {
            given:
            createDir('parent') {
                child {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 11 06:18:03 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  2. subprojects/core/src/integTest/groovy/org/gradle/api/tasks/CacheTaskOutputIntegrationTest.groovy

            def tgzCacheEntry = temporaryFolder.file("cache.tgz")
            cacheEntry.copyBytesTo(tgzCacheEntry)
            def extractDir = temporaryFolder.file("extract")
            tgzCacheEntry.untarTo(extractDir)
            tgzCacheEntry.delete()
    
            def metadata = new Properties()
            extractDir.file("METADATA").withInputStream { input ->
                metadata.load(input)
            }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Feb 20 17:51:57 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  3. platforms/jvm/plugins-application/src/integTest/groovy/org/gradle/integtests/ApplicationIntegrationSpec.groovy

            def distTarFile = file('build/distributions/mega-app.tar')
            distTarFile.assertIsFile()
    
            def distTarDir = file('build/untar')
            distTarFile.usingNativeTools().untarTo(distTarDir)
            checkApplicationImage('mega-app', distTarDir.file('mega-app'))
        }
    
        def "check distribution contents when all defaults used"() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Mar 08 22:15:44 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  4. subprojects/core/src/integTest/groovy/org/gradle/api/tasks/bundling/ArchiveIntegrationTest.groovy

                    archiveFileName = 'test.tar'
                }
    '''
            when:
            run 'tar'
            then:
            def expandDir = file('expanded')
            file('build/test.tar').untarTo(expandDir)
            expandDir.assertHasDescendants('dir1/file1.txt', 'file1.txt', 'dir2/file2.txt', 'scripts/dir1', 'scripts/dir2/script.sh')
    
            expandDir.file('dir1/file1.txt').assertContents(equalTo('[abc]'))
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Apr 03 15:21:23 UTC 2024
    - 30.2K bytes
    - Viewed (0)
  5. subprojects/core/src/test/groovy/org/gradle/api/internal/file/archive/TarCopyActionSpec.groovy

        }
    
        private void tarAndUntarAndCheckFileContents(TestFile tarFile) {
            tar(file("dir/file1"), file("file2"))
    
            TestFile expandDir = temporaryFolder.getTestDirectory().file("expanded")
            tarFile.untarTo(expandDir)
            expandDir.file("dir/file1").assertContents(equalTo("contents of dir/file1"))
            expandDir.file("file2").assertContents(equalTo("contents of file2"))
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Jun 22 14:26:33 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  6. platforms/software/plugins-distribution/src/integTest/groovy/org/gradle/api/plugins/DistributionPluginIntegrationTest.groovy

                    }
                }
    
                """
            then:
            succeeds('customDistTar')
            and:
            file('build/distributions/TestProject-custom.tar').usingNativeTools().untarTo(file("untar"))
            file("untar/TestProject-custom/someFile").assertIsFile()
        }
    
        def "can create distribution with .tar in project name"() {
            when:
            buildFile << """
                apply plugin: 'application'
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Oct 20 21:03:51 UTC 2023
    - 13.8K bytes
    - Viewed (0)
  7. testing/internal-testing/src/main/groovy/org/gradle/test/fixtures/file/TestFileHelper.groovy

                return
            }
    
            def untar = new Untar()
            untar.setSrc(file)
            untar.setDest(target)
    
            if (file.name.endsWith(".tgz")) {
                def method = new Untar.UntarCompressionMethod()
                method.value = "gzip"
                untar.compression = method
            } else if (file.name.endsWith(".tbz2")) {
                def method = new Untar.UntarCompressionMethod()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  8. subprojects/core/src/integTest/groovy/org/gradle/api/tasks/CacheTaskArchiveErrorIntegrationTest.groovy

                def tgzCacheEntry = temporaryFolder.file("cache.tgz")
                cacheEntry.copyTo(tgzCacheEntry)
                def extractDir = temporaryFolder.file("extract")
                tgzCacheEntry.untarTo(extractDir)
                tgzCacheEntry.delete()
    
                def metadataFile = extractDir.file("METADATA")
                if (matcher.test(metadataFile)) {
                    println "> Corrupting $cacheEntry..."
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Apr 03 15:21:23 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  9. testing/internal-testing/src/main/groovy/org/gradle/test/fixtures/file/TestFile.java

            assertIsFile();
            new TestFileHelper(this).unzipTo(target, useNativeTools, false);
        }
    
        public void untarTo(File target) {
            assertIsFile();
    
            new TestFileHelper(this).untarTo(target, useNativeTools);
        }
    
        public void copyTo(File target) {
            if (isDirectory()) {
                try {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 18:31:52 UTC 2024
    - 30.3K bytes
    - Viewed (0)
  10. cmd/untar.go

    		return d.r.Read(p)
    	}
    	return 0, errors.New("reader closed")
    }
    
    func (d *disconnectReader) Close() error {
    	d.mu.Lock()
    	d.r = nil
    	d.mu.Unlock()
    	return nil
    }
    
    func untar(ctx context.Context, r io.Reader, putObject func(reader io.Reader, info os.FileInfo, name string) error, o untarOptions) error {
    	bf := bufio.NewReader(r)
    	switch f := detect(bf); f {
    	case formatGzip:
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Apr 04 12:04:40 UTC 2024
    - 6K bytes
    - Viewed (0)
Back to top