[Java] Java文件拷贝代码范例 →→→→→进入此内容的聊天室

来自 , 2019-03-26, 写在 Java, 查看 140 次.
URL http://www.code666.cn/view/254ed7d2
  1. import java.io.File;
  2. import java.util.StringTokenizer;
  3.  
  4. public class CopyFiles extends FileUtil {
  5.        
  6.         private static void CopyFiles_Help(final String src, final String dest)
  7.         {
  8.                 int nIndex = dest.lastIndexOf(File.separator);
  9.                 CreateFolders( dest.substring(0, nIndex) );
  10.                 CopyFile(src,dest);
  11.                
  12.         }
  13.         public static void main(String[] args) {
  14.                 String[] strs=new String[]{
  15.                                 "target\\config\\comps\\src\\usrUsb2PhdcInit.c",
  16.                                 "target\\config\\comps\\src\\usrUsbDebug.c",
  17.                                 "target\\config\\comps\\src\\usrUsbInit.c",
  18.                                 "target\\config\\comps\\vxWorks\\40usb.cdf",
  19.                                 "target\\h\\usb\\usbOsalDebug.h",
  20.                                 "target\\h\\usb2\\usb2Phdc.h",
  21.                                 "target\\src\\drv\\usb2\\healthcare\\usb2Phdc.c",
  22.                                 "target\\src\\drv\\usb2\\healthcare\\Makefile"
  23.                 };
  24.                
  25.                 for(int i=0;i<strs.length;i++){
  26.                         CopyFiles_Help("D:\\wind6921\\vxworks-6.9\\"+strs[i], "D:\\My Documents\\Google Drive\\pmd-medical\\usbhealthcare"+strs[i] );
  27.                 }
  28.         }
  29.  
  30. }
  31.  
  32. //java/5512

回复 "Java文件拷贝代码范例"

这儿你可以回复上面这条便签

captcha