/** Copies content of one folder into another. * @param source source folder * @param target target folder * @exception IOException if it fails */ private static void copyContent(FileObject source, FileObject target) throws IOException { FileObject[] srcArr = source.getChildren(); copyAttrs(source, target); //added for (int i = 0; i < srcArr.length; i++) { FileObject child = srcArr[i]; if (MultiFileSystem.isMaskFile(child)) { continue; } if (target.getFileObject(child.getName(), child.getExt()) == null) { if (child.isData()) { FileObject fo = FileUtil.copyFile(child, target, child.getName(), child.getExt()); if (fo != null) { copyAttrs(child, fo); } } else { FileObject targetChild = target.createFolder(child.getName()); copyContent(child, targetChild); } } } }
copyAttrs(this, leader); } else {
/** Copies content of one folder into another. * @param source source folder * @param target target folder * @exception IOException if it fails */ private static void copyContent (FileObject source, FileObject target) throws IOException { FileObject[] srcArr = source.getChildren (); copyAttrs (source, target);//added for (int i = 0; i < srcArr.length; i++) { FileObject child = srcArr[i]; if (MultiFileSystem.isMaskFile (child) ) continue; if (target.getFileObject (child.getName (), child.getExt ()) == null) { if (child.isData ()) { FileObject fo = FileUtil.copyFile (child, target, child.getName (), child.getExt ()); if (fo != null) copyAttrs (child, fo); } else { FileObject targetChild = target.createFolder (child.getName ()); copyContent (child, targetChild); } } } }
/** Copies content of one folder into another. * @param source source folder * @param target target folder * @exception IOException if it fails */ private static void copyContent (FileObject source, FileObject target) throws IOException { FileObject[] srcArr = source.getChildren (); copyAttrs (source, target);//added for (int i = 0; i < srcArr.length; i++) { FileObject child = srcArr[i]; if (MultiFileSystem.isMaskFile (child) ) continue; if (target.getFileObject (child.getName (), child.getExt ()) == null) { if (child.isData ()) { FileObject fo = FileUtil.copyFile (child, target, child.getName (), child.getExt ()); if (fo != null) copyAttrs (child, fo); } else { FileObject targetChild = target.createFolder (child.getName ()); copyContent (child, targetChild); } } } }
copyAttrs (this, leader); } else {
copyAttrs (this, leader); } else {