String[] children = fileHandler.getChildren(path);
String[] children = fileHandler.getChildren(path);
/** * Resolves a file/directory path into a map of file paths which specifies each file of the * directory, or the file itself. * * @param files The map to put each resolved file in. * @param file The absolute file path to resolve. * @param relativePath The relative path of the file. */ private void resolveFile(Map<String, String> files, String file, String relativePath) { if (fileHandler.isDirectory(file)) { String[] children = fileHandler.getChildren(file); if (children != null && children.length != 0) { for (String child : children) { resolveFile(files, child, fileHandler.append(relativePath, fileHandler.getName(child))); } } } else { files.put(relativePath, file); } }
/** * Resolves a file/directory path into a map of file paths which specifies each file of the * directory, or the file itself. * * @param files The map to put each resolved file in. * @param file The absolute file path to resolve. * @param relativePath The relative path of the file. */ private void resolveFile(Map<String, String> files, String file, String relativePath) { if (fileHandler.isDirectory(file)) { String[] children = fileHandler.getChildren(file); if (children != null && children.length != 0) { for (String child : children) { resolveFile(files, child, fileHandler.append(relativePath, fileHandler.getName(child))); } } } else { files.put(relativePath, file); } }
/** * Add mail JARs to extra classpath. * @param container Container. */ private void addMailJarsToExtraClasspath(InstalledLocalContainer container) { String mail = System.getProperty("cargo.testdata.mail-jars"); if (mail != null) { String[] jars = container.getFileHandler().getChildren(mail); for (String jar : jars) { container.addExtraClasspath(jar); } } }
for (String npnFile : getFileHandler().getChildren(npnFolder))
for (String npnFile : getFileHandler().getChildren(npnFolder))
/** * Test the {@link FileHandler#getChildren(java.lang.String)} method. * @throws Exception If anything goes wrong. */ public void testGetChildren() throws Exception { this.fsManager.resolveFile("ram:///some/directory/file.txt").createFile(); String[] children = this.fileHandler.getChildren("ram:///some/directory"); assertEquals(1, children.length); assertEquals("ram:///some/directory/file.txt", children[0]); }
String[] files = getFileHandler().getChildren(targetDir); int nbDirectories = 0; String foundDirectory = null;
Map<String, String> replaceJettyHome = new HashMap<String, String>(1); replaceJettyHome.put("jetty.home", "config.home"); for (String etcChild : getFileHandler().getChildren(etcDir))
Map<String, String> replaceJettyHome = new HashMap<String, String>(1); replaceJettyHome.put("jetty.home", "config.home"); for (String etcChild : getFileHandler().getChildren(etcDir))