package com.mir.video.utils;

import java.io.File;

public class Common {
	/**
	 * ClassName:FileSocketWrite
	 * 
	 * @author <font color="red">Edson</font>
	 * @version
	 * @since Ver 1.1
	 * @Date 2014年6月27日 下午6:12:38
	 * 
	 * @see
	 */
	public static int getFileCount() {
		String userDir = System.getProperty("user.dir");
		String se = System.getProperty("file.separator");
		File file = new File(userDir + se + "image");
		if (!file.isDirectory()) {
			return 0;
		}
		String[] fileStr = file.list();
		int count = 0;
		for (String s : fileStr) {
			String tail = s.substring(s.lastIndexOf("."), s.length()); // 小尾巴
			if (".jpg".equalsIgnoreCase(tail)) { // 不区分大小写
				count++;
			}
		}
		return count;
	}
}
最近下载更多
myj2006  LV11 2019年8月30日
18089237297  LV3 2019年4月26日
pzg8616235  LV8 2018年9月10日
lhyi23  LV1 2018年6月11日
华丽的孤单331  LV9 2018年6月4日
zs3480  LV11 2018年2月3日
15943876586  LV17 2017年2月7日
都市书  LV4 2016年11月15日
gjynewer  LV15 2016年9月2日
gutong  LV10 2015年10月3日
最近浏览更多
dapeng0011  LV13 2月25日
飞翔的面包片  LV12 2023年12月19日
pangzhihui  LV12 2023年12月15日
lironggang  LV38 2023年6月13日
aq384419 2023年4月15日
暂无贡献等级
超维智能编程  LV6 2023年2月26日
nywgzhc  LV10 2022年11月20日
mc0624 2022年10月13日
暂无贡献等级
爱情戴罪的羔羊  LV7 2022年9月9日
zhezhizhu123  LV1 2022年7月11日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友