List of utility methods to do Directory Copy
void | CopyDir(String sourcedir, String destdir) This class copies an input files of a directory to another directory not include subdir File dest = new File(destdir); File source = new File(sourcedir); String[] files = source.list(); try { makehome(destdir); } catch (Exception ex) { throw new Exception("CopyDir:" + ex.getMessage()); for (int i = 0; i < files.length; i++) { String sourcefile = source + File.separator + files[i]; String destfile = dest + File.separator + files[i]; File temp = new File(sourcefile); if (temp.isFile()) { try { copy(sourcefile, destfile); } catch (Exception ex) { throw new Exception("CopyDir:" + ex.getMessage()); |
boolean | copyDir(File source, File destination) copy Dir InputStream in = null; OutputStream out = null; label222: try { if (source.isDirectory()) { if (!destination.exists()) { destination.mkdir(); String[] children = source.list(); ... |
void | copyDirectory(@NotNull String srcDir, @NotNull String dstDir, @NotNull final List copy Directory logger.entry(srcDir, dstDir, excludes); Validate.notEmpty(srcDir); Validate.notEmpty(dstDir); final File source = new File(srcDir); if (!source.exists()) { throw logger.throwing(new FileNotFoundException(srcDir)); final File destination = new File(dstDir); ... |
boolean | copyDirectory(File from, File to) Copy a directory and all of its contents. return copyDirectory(from, to, (byte[]) null); |
boolean | copyDirectory(File from, File to, byte[] buffer) copy Directory if (from == null) return false; if (!from.exists()) return true; if (!from.isDirectory()) return false; if (to.exists()) return false; ... |
void | copyDirectory(File source, File destination) copy Directory if (source.exists() && source.isDirectory()) { if (!destination.exists()) { destination.mkdirs(); File[] fileArray = source.listFiles(); for (int i = 0; i < fileArray.length; i++) { if (fileArray[i].isDirectory()) { copyDirectory(fileArray[i], ... |
boolean | copyDirectory(String from, String to) copy Directory return copyDirectory(new File(from), new File(to)); |
void | copyDirectory(String sourceDirName, String destinationDirName) copy Directory copyDirectory(new File(sourceDirName), new File(destinationDirName)); |
void | copyDirectory(File sourceDir, File targetDir) copy Directory targetDir.mkdirs(); if (null != sourceDir) { File[] file = sourceDir.listFiles(); for (int i = 0; i < file.length; i++) { if (file[i].isFile()) { File sourceFile = file[i]; File targetFile = new File(targetDir.getAbsolutePath() + File.separator + file[i].getName()); ... |