public void addFileSource(String path, String cnt, boolean omitIfExists) throws IOException { File tmp = Utilities.createTempFile("tmp", ".tmp"); TextFile.stringToFile(cnt, tmp.getAbsolutePath()); addFileName(path, tmp.getAbsolutePath(), omitIfExists); tmp.delete(); }
public void addFolder(String actualDir, String statedDir, boolean omitIfExists, String noExt) throws IOException { File fd = new CSFile(actualDir); String files[] = fd.list(); for (String f : files) { if (new CSFile(Utilities.path(actualDir, f)).isDirectory()) addFolder(Utilities.path(actualDir, f), Utilities.pathURL(statedDir, f), omitIfExists, noExt); else if (noExt == null || !f.endsWith(noExt)) addFileName(Utilities.pathURL(statedDir, f), Utilities.path(actualDir, f), omitIfExists); } }
public void addFolder(String actualDir, String statedDir, boolean omitIfExists) throws IOException { File fd = new CSFile(actualDir); String files[] = fd.list(); for (String f : files) { if (new CSFile(Utilities.path(actualDir, f)).isDirectory()) addFolder(Utilities.path(actualDir, f), Utilities.pathURL(statedDir, f), omitIfExists); else addFileName(Utilities.pathURL(statedDir, f), Utilities.path(actualDir, f), omitIfExists); } }
public void addFileSource(String path, String cnt, boolean omitIfExists) throws IOException { File tmp = Utilities.createTempFile("tmp", ".tmp"); TextFile.stringToFile(cnt, tmp.getAbsolutePath()); addFileName(path, tmp.getAbsolutePath(), omitIfExists); tmp.delete(); }
public void addFolder(String actualDir, String statedDir, boolean omitIfExists, String noExt) throws IOException { File fd = new CSFile(actualDir); String files[] = fd.list(); for (String f : files) { if (new CSFile(Utilities.path(actualDir, f)).isDirectory()) addFolder(Utilities.path(actualDir, f), Utilities.pathURL(statedDir, f), omitIfExists, noExt); else if (noExt == null || !f.endsWith(noExt)) addFileName(Utilities.pathURL(statedDir, f), Utilities.path(actualDir, f), omitIfExists); } }
public void addFolder(String actualDir, String statedDir, boolean omitIfExists) throws IOException { File fd = new CSFile(actualDir); String files[] = fd.list(); for (String f : files) { if (new CSFile(Utilities.path(actualDir, f)).isDirectory()) addFolder(Utilities.path(actualDir, f), Utilities.pathURL(statedDir, f), omitIfExists); else addFileName(Utilities.pathURL(statedDir, f), Utilities.path(actualDir, f), omitIfExists); } }