文件路径:File file1 = new File("D:/A.java");
File file2 = new File("D:/test");
File file3 = new File(file2+file1.getAbsolutePath.substring(3));//D:/test/A.java
创建文件夹:file2.mkdirs();
输入流:FileInputStream fins = new FileInputStream(file1);
输出流:FileOutputStream fots = new FileOutputStream(file3);
byte b[] = new byte[1024];
int len = 0;
读文件:len = fins.read(b);
写文件:fots.write(b,0,len);
展开文件:File fs[] = file2.listFile();
关闭流:fins.close();
fots.close();
//新建文件:file1.createNewFile();
//删除文件:file1.delete();