Package org.apache.tools.ant.types.resources

Examples of org.apache.tools.ant.types.resources.FileResource


                tarFile(f, tOut, name, tfs);
            }
        } else if (rc.isFilesystemOnly()) {
            Iterator iter = rc.iterator();
            while (iter.hasNext()) {
                FileResource r = (FileResource) iter.next();
                File f = r.getFile();
                if (f == null) {
                    f = new File(r.getBaseDir(), r.getName());
                }
                tarFile(f, tOut, f.getName(), tfs);
            }
        } else { // non-file resources
            Iterator iter = rc.iterator();
            while (iter.hasNext()) {
                Resource r = (Resource) iter.next();
                tarResource(r, tOut, r.getName(), tfs);
            }
        }
    }
View Full Code Here


            stylesheet.setURL(stylesheetURL);
            return stylesheet;
        }
        // If we are here, then the style dir is here and we
        // should read the stylesheet from the filesystem
        FileResource stylesheet = new FileResource();
        File stylesheetFile = new File(styleDir, xslname);
        stylesheet.setFile(stylesheetFile);
        return stylesheet;
    }
View Full Code Here

     * "dir" and "src" from being specified.
     *
     * @param srcFile The archive from which to extract entries.
     */
    public void setSrc(File srcFile) {
        setSrcResource(new FileResource(srcFile));
    }
View Full Code Here

                        log("DEPRECATED - the 'style' attribute should be relative "
                                + "to the project's");
                        log("             basedir, not the tasks's basedir.");
                    }
                }
                FileResource fr = new FileResource();
                fr.setProject(getProject());
                fr.setFile(stylesheet);
                xslResource = fr;
            }

            // if we have an in file and out then process them
            if (inFile != null && outFile != null) {
View Full Code Here

                continue;
            }
            File base = baseDir;
            String name = r.getName();
            if (r instanceof FileResource) {
                FileResource f = (FileResource) r;
                base = f.getBaseDir();
                if (base == null) {
                    name = f.getFile().getAbsolutePath();
                }
            }
            process(base, name, destDir, stylesheet);
        }
    }
View Full Code Here

     * @param stylesheet the file from which to load the stylesheet.
     * @exception BuildException if the stylesheet cannot be loaded.
     * @deprecated since Ant 1.7
     */
    protected void configureLiaison(File stylesheet) throws BuildException {
        FileResource fr = new FileResource();
        fr.setProject(getProject());
        fr.setFile(stylesheet);
        configureLiaison(fr);
    }
View Full Code Here

    /**
     * Set a single target File.
     * @param f the single File
     */
    public void setFile(File f) {
        add(new FileResource(f));
    }
View Full Code Here

    /**
     * The file to expand; required.
     * @param src file to expand
     */
    public void setSrc(File src) {
        setSrcResource(new FileResource(src));
    }
View Full Code Here

     * is scanned for matching entries.
     *
     * @param srcFile the (non-null) archive file name for scanning
     */
    public void setSrc(File srcFile) {
        setSrc(new FileResource(srcFile));
    }
View Full Code Here

    public void setFiles(String filenames) {
        StringTokenizer t = new StringTokenizer(filenames, ", ");

        while (t.hasMoreTokens()) {
            createAttachments()
                .add(new FileResource(getProject().resolveFile(t.nextToken())));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.types.resources.FileResource

Copyright © 2018 www.massapicom. 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.