`

获取文件大小

    博客分类:
  • java
 
阅读更多
    public static void main(String[] args) {  
        File f= new File("D:\\CentOS-6.5-x86_64-bin-DVD1.iso");  
        if (f.exists() && f.isFile()){  
            logger.info(f.length());  
        }else{  
            logger.info("file doesn't exist or is not a file");  
        }  
    }  

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics