Examples of file()


Examples of org.gradle.util.TestFile.file()

        visitor.endVisit();

        TestFile expandDir = tmpDir.getDir().file("expanded");
        tarFile.untarTo(expandDir);
        expandDir.file("dir/file1").assertContents(equalTo("contents of dir/file1"));
        expandDir.file("file2").assertContents(equalTo("contents of file2"));
    }

    @Test
    public void createsBzip2CompressedTarFile() {
        final TestFile tarFile = tmpDir.getDir().file("test.tbz2");
View Full Code Here

Examples of org.gradle.util.TestFile.file()

    @Test
    public void deletesExtraDirectoriesFromDestinationDirectoryAtTheEndOfVisit() {
        TestFile destDir = tmpDir.createDir("dest");
        destDir.file("included.txt").createFile();
        destDir.file("extra/extra.txt").createFile();

        visitor.startVisit(action(destDir));
        visitor.visitFile(file("included.txt"));
        visitor.endVisit();
View Full Code Here

Examples of org.gradle.util.TestFile.file()

        visitor.endVisit();

        TestFile expandDir = tmpDir.getDir().file("expanded");
        tarFile.untarTo(expandDir);
        expandDir.file("dir/file1").assertContents(equalTo("contents of dir/file1"));
        expandDir.file("file2").assertContents(equalTo("contents of file2"));
    }

    @Test
    public void wrapsFailureToOpenOutputFile() {
View Full Code Here

Examples of org.gradle.util.TestFile.file()

        visitor.endVisit();

        TestFile expandDir = tmpDir.getDir().file("expanded");
        tarFile.untarTo(expandDir);
        expandDir.file("dir/file1").assertContents(equalTo("contents of dir/file1"));
        expandDir.file("file2").assertContents(equalTo("contents of file2"));
    }

    @Test
    public void wrapsFailureToOpenOutputFile() {
        final TestFile tarFile = tmpDir.createDir("test.tar");
View Full Code Here

Examples of org.gradle.util.TestFile.file()

    }

    @Test
    public void doesNotDeleteDestDirectoryWhenNothingCopied() {
        TestFile destDir = tmpDir.createDir("dest");
        destDir.file("extra.txt").createFile();
        destDir.file("extra/extra.txt").createFile();

        visitor.startVisit(action(destDir));
        visitor.endVisit();
View Full Code Here

Examples of org.gradle.util.TestFile.file()

    @Test
    public void doesNotDeleteDestDirectoryWhenNothingCopied() {
        TestFile destDir = tmpDir.createDir("dest");
        destDir.file("extra.txt").createFile();
        destDir.file("extra/extra.txt").createFile();

        visitor.startVisit(action(destDir));
        visitor.endVisit();

        destDir.assertHasDescendants();
View Full Code Here

Examples of org.gradle.util.TestFile.file()

    }

    @Test
    public void didWorkWhenFilesDeleted() {
        TestFile destDir = tmpDir.createDir("dest");
        destDir.file("extra.txt").createFile();

        visitor.startVisit(action(destDir));
        visitor.endVisit();

        assertTrue(visitor.getDidWork());
View Full Code Here

Examples of org.gradle.util.TestFile.file()

            }
        });
        wrapper.execute();
        TestFile unjarDir = tmpDir.createDir("unjar");
        expectedTargetWrapperJar.unzipTo(unjarDir);
        unjarDir.file(GradleWrapperMain.class.getName().replace(".", "/") + ".class").assertIsFile();
        Properties properties = GUtil.loadProperties(expectedTargetWrapperProperties);
        assertEquals(properties.getProperty(Wrapper.URL_ROOT_PROPERTY), wrapper.getUrlRoot());
        assertEquals(properties.getProperty(Wrapper.DISTRIBUTION_BASE_PROPERTY), wrapper.getDistributionBase().toString());
        assertEquals(properties.getProperty(Wrapper.DISTRIBUTION_PATH_PROPERTY), wrapper.getDistributionPath());
        assertEquals(properties.getProperty(Wrapper.DISTRIBUTION_NAME_PROPERTY), wrapper.getArchiveName());
View Full Code Here

Examples of org.jruby.runtime.load.IAutoloadMethod.file()

        String name = module.getName() + "::" + symbol.asJavaString();
       
        IAutoloadMethod autoloadMethod = runtime.getLoadService().autoloadFor(name);
        if (autoloadMethod == null) return runtime.getNil();

        return runtime.newString(autoloadMethod.file());
    }

    @JRubyMethod(name = "autoload", required = 2, frame = true, module = true, visibility = PRIVATE)
    public static IRubyObject autoload(final IRubyObject recv, IRubyObject symbol, final IRubyObject file) {
        Ruby runtime = recv.getRuntime();
View Full Code Here

Examples of org.mifosplatform.infrastructure.documentmanagement.data.FileData.file()

            @PathParam("documentId") final Long documentId) {

        this.context.authenticatedUser().validateHasReadPermission(this.SystemEntityType);

        final FileData fileData = this.documentReadPlatformService.retrieveFileData(entityType, entityId, documentId);
        final ResponseBuilder response = Response.ok(fileData.file());
        response.header("Content-Disposition", "attachment; filename=\"" + fileData.name() + "\"");
        response.header("Content-Type", fileData.contentType());

        return response.build();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.