java 獲取文件夾大小,文件大小,文件個數(註:轉載於http://blog.sina.com.cn/s/blog_45096c6a0100btse.html) - anchor110 - Blog
package tony; import java.io.File; import java.text.DecimalFormat; import java.io.FileInputStream; public class GetFileSize { public long getFileSizes(File f) throws Exception{//取得文件大小 long s=0; if (f.exists()) { FileInputStream fis = null;...