public class CopyTextTest {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
File oldFile = new File("E:\\");
System.out.println("oldFile:" + oldFile.length()); //这样获取就是OK的
File newFile = new File("E:\\d\\"); 这样获取打印结果就为0呢
System.out.println("newFile:" + newFile.length());
} |