/** * Returns the list of files corresponding to the resource collection * * @param resources - A list of {@link ResourceCollection} * @return the list of files corresponding to the resource collection * @throws BuildException */ private List<String> getFiles(List<ResourceCollection> resources) throws BuildException { List<String> files= Lists.newArrayList(); for (ResourceCollection rc : resources) { for (Resource o : rc) { if (o instanceof FileResource) { FileResource fr = ((FileResource) o); if (fr.isDirectory()) { throw new BuildException("Directory based FileResources are not supported."); } if (! fr.isExists()) { log("'" + fr.toLongString() + "' does not exist", Project.MSG_VERBOSE); } files.add(fr.getFile().getAbsolutePath()); } else { log("Unsupported Resource type: " + o.toString(), Project.MSG_VERBOSE); } } } return files; }
/** * Returns the list of files corresponding to the resource collection * * @param resources - A list of {@link ResourceCollection} * @return the list of files corresponding to the resource collection * @throws BuildException */ private List<String> getFiles(List<ResourceCollection> resources) throws BuildException { List<String> files = Lists.newArrayList(); for (ResourceCollection rc : resources) { for (Resource o : rc) { if (o instanceof FileResource) { FileResource fr = ((FileResource) o); if (fr.isDirectory()) { throw new BuildException("Directory based FileResources are not supported."); } if (!fr.isExists()) { log("'" + fr.toLongString() + "' does not exist", Project.MSG_VERBOSE); } files.add(fr.getFile().getAbsolutePath()); } else { log("Unsupported Resource type: " + o.toString(), Project.MSG_VERBOSE); } } } return files; }