Examples of mapFileName()


Examples of org.apache.tools.ant.util.FileNameMapper.mapFileName()

        }
        String message = "Converting " + count + " file"
            + (count != 1 ? "s" : "") + " from ";
        log(message + srcDir + " to " + destDir);
        for (int i = 0; i < files.length; i++) {
            convert(files[i], m.mapFileName(files[i])[0]);
        }
    }

    /**
     * Convert a single file.
View Full Code Here

Examples of org.apache.tools.ant.util.FileNameMapper.mapFileName()

            ResourceCollection resources = isPreserveDuplicates() ? (ResourceCollection) path : new Union(path);
            List ret = new ArrayList();
            FileNameMapper mapperImpl = mapper == null ? new IdentityMapper() : mapper.getImplementation();
            for (Resource r : resources) {
                String[] mapped = mapperImpl.mapFileName(String.valueOf(r));
                for (int m = 0; mapped != null && m < mapped.length; ++m) {
                    ret.add(mapped[m]);
                }
            }
            boolean first = true;
View Full Code Here

Examples of org.apache.tools.ant.util.FileNameMapper.mapFileName()

                mapper = mapperElement.getImplementation();
            } else {
                mapper = new StyleMapper();
            }

            String[] outFileName = mapper.mapFileName(xmlFile);
            if (outFileName == null || outFileName.length == 0) {
                log("Skipping " + inFile + " it cannot get mapped to output.",
                    Project.MSG_VERBOSE);
                return;
            } else if (outFileName == null || outFileName.length > 1) {
View Full Code Here

Examples of org.apache.tools.ant.util.FileNameMapper.mapFileName()

                rpaths[i] = fileUtils.removeLeadingPath(relativeDir, new File(spaths[i]));
            }

            FileNameMapper fileNameMapper = mapper.getImplementation();
            for (int i = 0; i < spaths.length; ++i) {
                String[] mapped = fileNameMapper.mapFileName(rpaths[i]);
                if (mapped != null) {
                    for (int j = 0; j < mapped.length; ++j) {
                        if (outOfDate(new File(spaths[i]),
                                      fileUtils.resolveFile(
                                          baseDir, mapped[j]))) {
View Full Code Here

Examples of org.apache.tools.ant.util.FileNameMapper.mapFileName()

        for (Iterator iter = names.iterator(); iter.hasNext();) {
            String name = (String) iter.next();
            String value = (String) props.get(name);
            if (mapper != null) {
                //map the names
                String[] newname = mapper.mapFileName(name);
                if (newname != null) {
                    name = newname[0];
                }
            }
            properties.setProperty(name, value);
View Full Code Here

Examples of org.apache.tools.ant.util.FileNameMapper.mapFileName()

                mapper = mapperElement.getImplementation();
            } else {
                mapper = new StyleMapper();
            }

            String[] outFileName = mapper.mapFileName(xmlFile);
            if (outFileName == null || outFileName.length == 0) {
                log("Skipping " + inFile + " it cannot get mapped to output.", Project.MSG_VERBOSE);
                return;
            } else if (outFileName == null || outFileName.length > 1) {
                log("Skipping " + inFile + " its mapping is ambiguos.", Project.MSG_VERBOSE);
View Full Code Here

Examples of org.apache.tools.ant.util.FileNameMapper.mapFileName()

                //calculate our destination directory; it is either the destDir
                //attribute, or the base dir of the fileset (for in situ updates)
                File toDir = hasDestDir ? destDir : fr.getBaseDir();

                //determine the destination filename via the mapper
                String[] destFilenames = destMapper.mapFileName(fr.getName());
                if (destFilenames == null || destFilenames.length != 1) {
                    //we only like simple mappers.
                    throw new BuildException(ERROR_BAD_MAP + fr.getFile());
                }
                File destFile = new File(toDir, destFilenames[0]);
View Full Code Here

Examples of org.apache.tools.ant.util.FileNameMapper.mapFileName()

                        path = path.substring(slash + 1);
                    }
                    dest = new File(destination, path);
                } else {
                    FileNameMapper mapper = mapperElement.getImplementation();
                    String[] d = mapper.mapFileName(source.toString());
                    if (d == null) {
                        log("skipping " + r + " - mapper can't handle it",
                            Project.MSG_WARN);
                        continue;
                    } else if (d.length == 0) {
View Full Code Here

Examples of org.apache.tools.ant.util.FileNameMapper.mapFileName()

                mapper = mapperElement.getImplementation();
            } else {
                mapper = new StyleMapper();
            }

            String[] outFileName = mapper.mapFileName(xmlFile);
            if (outFileName == null || outFileName.length == 0) {
                log("Skipping " + inFile + " it cannot get mapped to output.",
                    Project.MSG_VERBOSE);
                return;
            } else if (outFileName == null || outFileName.length > 1) {
View Full Code Here

Examples of org.apache.tools.ant.util.FileNameMapper.mapFileName()

        }
        String message = "Converting " + count + " file"
            + (count != 1 ? "s" : "") + " from ";
        log(message + srcDir + " to " + destDir);
        for (int i = 0; i < files.length; i++) {
            convert(files[i], m.mapFileName(files[i])[0]);
        }
    }

    /**
     * Convert a single file.
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.